@@ -1237,48 +1237,6 @@ g3d.Sphere.destroy = async (args, env) => {
12371237
12381238g3d . Sphere . virtual = true ;
12391239
1240- g3d . Sky = ( args , env ) => {
1241- const sky = new Sky ( ) ;
1242- sky . scale . setScalar ( 10000 ) ;
1243- env . mesh . add ( sky ) ;
1244- env . sky = sky ;
1245- env . sun = new THREE . Vector3 ( ) ;
1246-
1247- const skyUniforms = sky . material . uniforms ;
1248-
1249- skyUniforms [ 'turbidity' ] . value = 10 ;
1250- skyUniforms [ 'rayleigh' ] . value = 2 ;
1251- skyUniforms [ 'mieCoefficient' ] . value = 0.005 ;
1252- skyUniforms [ 'mieDirectionalG' ] . value = 0.8 ;
1253- } ;
1254-
1255- g3d . _Water = ( args , env ) => {
1256- const waterGeometry = new THREE . PlaneGeometry ( 10000 , 10000 ) ;
1257-
1258- const water = new Water (
1259- waterGeometry ,
1260- {
1261- textureWidth : 512 ,
1262- textureHeight : 512 ,
1263- waterNormals : new THREE . TextureLoader ( ) . load ( 'textures/waternormals.jpg' , function ( texture ) {
1264-
1265- texture . wrapS = texture . wrapT = THREE . RepeatWrapping ;
1266- } ) ,
1267-
1268- sunDirection : new THREE . Vector3 ( ) ,
1269- sunColor : 0xffffff ,
1270- waterColor : 0x001e0f ,
1271- distortionScale : 3.7 ,
1272- fog : true
1273- }
1274- ) ;
1275-
1276- water . rotation . x = - Math . PI / 2 ;
1277-
1278- env . mesh . add ( water ) ;
1279- env . water = water ;
1280- } ;
1281-
12821240g3d . Cube = async ( args , env ) => {
12831241 let position = new THREE . Vector3 ( 0 , 0 , 0 ) ;
12841242 let scale = new THREE . Vector3 ( 1 , 1 , 1 ) ;
@@ -4406,9 +4364,6 @@ g3d.AnimationFrameListener.destroy = async (args, env) => {
44064364
44074365g3d . AnimationFrameListener . virtual = true ;
44084366
4409- let Water = false ;
4410- let Sky = false ;
4411-
44124367g3d . Camera = ( args , env ) => {
44134368 console . warn ( 'temporary disabled' ) ;
44144369 return ;
@@ -4426,15 +4381,6 @@ g3d.DefaultLighting = (args, env) => {
44264381
44274382} ;
44284383
4429- g3d . SkyAndWater = async ( args , env ) => {
4430- console . warn ( 'temporary disabled' ) ;
4431- return ;
4432- } ;
4433-
4434- g3d . Sky = async ( args , env ) => {
4435- console . warn ( 'temporary disabled' ) ;
4436- return ;
4437- } ;
44384384
44394385const makeEditorView = async ( data , env = { global : { } } ) => {
44404386 //check by hash if there such object, if not. Ask server to create one with EditorView and store.
@@ -4474,62 +4420,6 @@ const makeEditorView = async (data, env = { global: {} }) => {
44744420 } ;
44754421
44764422
4477- g3d [ 'CoffeeLiqueur`Extensions`Graphics3D`Tools`WaterShader' ] = async ( args , env ) => {
4478-
4479-
4480- if ( ! Water ) {
4481- await interpretate . shared . THREEWater . load ( ) ;
4482- Water = interpretate . shared . THREEWater . Water ;
4483- //Water = (await import('three/examples/jsm/objects/Water.js')).Water;
4484- }
4485-
4486- let options = await core . _getRules ( args , env ) ;
4487- console . log ( 'options:' ) ;
4488-
4489-
4490- console . log ( options ) ;
4491- options . dims = options . Size || [ 10000 , 10000 ] ;
4492-
4493- let water ;
4494- // Water
4495-
4496- const waterGeometry = new THREE . PlaneGeometry ( ...options . dims ) ;
4497-
4498- water = new Water (
4499- waterGeometry ,
4500- {
4501- textureWidth : 512 ,
4502- textureHeight : 512 ,
4503- waterNormals : new THREE . TextureLoader ( ) . load ( 'https://cdn.statically.io/gh/JerryI/Mathematica-ThreeJS-graphics-engine/master/assets/waternormals.jpg' , function ( texture ) {
4504-
4505- texture . wrapS = texture . wrapT = THREE . RepeatWrapping ;
4506-
4507- } ) ,
4508- sunDirection : new THREE . Vector3 ( 1 , 1 , 1 ) ,
4509- sunColor : 0xffffff ,
4510- waterColor : 0x001e0f ,
4511- distortionScale : 3.7 ,
4512- fog : true
4513- }
4514- ) ;
4515-
4516- water . rotation . x = - Math . PI / 2 ;
4517-
4518- env . local . water = water ;
4519-
4520- env . global . scene . add ( water ) ;
4521-
4522- const sun = env . local . sun || ( new THREE . Vector3 ( 1 , 1 , 1 ) ) ;
4523- water . material . uniforms [ 'sunDirection' ] . value . copy ( sun ) . normalize ( ) ;
4524-
4525- //every frame
4526- env . local . handlers . push (
4527- function ( ) {
4528- env . local . water . material . uniforms [ 'time' ] . value += 1.0 / 60.0 ;
4529- }
4530- ) ;
4531- } ;
4532-
45334423
45344424g3d . Large = ( args , env ) => {
45354425 return 1.0 ;
0 commit comments