├── settings └── v2 │ └── packages │ ├── device.json │ ├── program.json │ ├── builder.json │ ├── project.json │ ├── cocos-service.json │ └── engine.json ├── assets ├── res │ ├── low.jpg │ ├── textures │ │ ├── auto-atlas.pac │ │ ├── miaomiao.png │ │ ├── iwaecat_cat_girl_toon__cel_shading_beautiful_1240b7e5-6b4f-42bb-8f6d-403abf1f7633.jpg │ │ ├── auto-atlas.pac.meta │ │ ├── miaomiao.png.meta │ │ └── iwaecat_cat_girl_toon__cel_shading_beautiful_1240b7e5-6b4f-42bb-8f6d-403abf1f7633.jpg.meta │ ├── model │ │ ├── Atlas.png │ │ ├── normal │ │ │ ├── ao.jpg │ │ │ ├── pbr.jpg │ │ │ ├── normal.jpg │ │ │ ├── diffuse.jpg │ │ │ ├── ao.jpg.meta │ │ │ ├── pbr.jpg.meta │ │ │ ├── normal.jpg.meta │ │ │ └── diffuse.jpg.meta │ │ ├── Mech_BarbaraTheBee.fbx │ │ ├── normal.meta │ │ └── Atlas.png.meta │ ├── mat │ │ ├── floor │ │ │ ├── Tile_Albedo.jpg │ │ │ ├── Tile_Normal.jpg │ │ │ ├── floorBlinnPhong.mtl.meta │ │ │ ├── floorPBR.mtl.meta │ │ │ ├── Tile_Albedo.jpg.meta │ │ │ ├── Tile_Normal.jpg.meta │ │ │ ├── floorBlinnPhong.mtl │ │ │ └── floorPBR.mtl │ │ ├── ball │ │ │ ├── Lambert.mtl.meta │ │ │ ├── unlit.mtl.meta │ │ │ ├── HalfLambert.mtl.meta │ │ │ ├── pbr.mtl.meta │ │ │ ├── toon.mtl.meta │ │ │ ├── blinnphong.mtl.meta │ │ │ ├── unlit.mtl │ │ │ ├── Lambert.mtl │ │ │ ├── HalfLambert.mtl │ │ │ ├── blinnphong.mtl │ │ │ ├── pbr.mtl │ │ │ └── toon.mtl │ │ ├── robot │ │ │ ├── Lambert.mtl.meta │ │ │ ├── PBR.mtl.meta │ │ │ ├── Toon.mtl.meta │ │ │ ├── unlit.mtl.meta │ │ │ ├── HalfLambert.mtl.meta │ │ │ ├── instancing.mtl.meta │ │ │ ├── Blinn-Phong.mtl.meta │ │ │ ├── ToonOutline.mtl.meta │ │ │ ├── unlit.mtl │ │ │ ├── Lambert.mtl │ │ │ ├── Blinn-Phong.mtl │ │ │ ├── instancing.mtl │ │ │ ├── HalfLambert.mtl │ │ │ ├── PBR.mtl │ │ │ ├── Toon.mtl │ │ │ └── ToonOutline.mtl │ │ ├── Depth-Text.mtl.meta │ │ ├── ball.meta │ │ ├── floor.meta │ │ ├── robot.meta │ │ └── Depth-Text.mtl │ ├── effect │ │ ├── Lambert.effect.meta │ │ ├── HalfLambert.effect.meta │ │ ├── Blinn-Phong.effect.meta │ │ ├── Toon-Shading.effect.meta │ │ ├── Lambert.effect │ │ ├── HalfLambert.effect │ │ └── Blinn-Phong.effect │ ├── effect.meta │ ├── mat.meta │ ├── model.meta │ ├── prefabs.meta │ ├── textures.meta │ ├── prefabs │ │ ├── menuItem.prefab.meta │ │ └── SelectMenu.prefab.meta │ └── low.jpg.meta ├── easyMenu │ ├── sprites │ │ ├── auto-atlas.pac │ │ ├── bmfont.png │ │ ├── sprite_splash.png │ │ ├── default_toggle_checkmark.png │ │ ├── auto-atlas.pac.meta │ │ ├── bmfont.png.meta │ │ ├── sprite_splash.png.meta │ │ ├── default_toggle_checkmark.png.meta │ │ └── bmfont.fnt │ ├── src │ │ ├── eEdit.ts.meta │ │ ├── eGraph.ts.meta │ │ ├── eGroup.ts.meta │ │ ├── eList.ts.meta │ │ ├── eSlider.ts.meta │ │ ├── eToggle.ts.meta │ │ ├── eItem.ts.meta │ │ ├── eMenu.ts.meta │ │ ├── eMenu.ts │ │ ├── eToggle.ts │ │ ├── eItem.ts │ │ ├── eList.ts │ │ ├── eEdit.ts │ │ ├── eSlider.ts │ │ ├── eGraph.ts │ │ └── eGroup.ts │ ├── CommonDebug.ts.meta │ ├── TimeScale.ts.meta │ ├── overDraw.mtl.meta │ ├── prefabs.meta │ ├── sprites.meta │ ├── src.meta │ ├── EasyMenu.prefab.meta │ ├── prefabs │ │ ├── EasyEdit.prefab.meta │ │ ├── EasyGraph.prefab.meta │ │ ├── EasyGroup.prefab.meta │ │ ├── EasyItem.prefab.meta │ │ ├── EasyList.prefab.meta │ │ ├── EasySlider.prefab.meta │ │ └── EasyToggle.prefab.meta │ ├── overDraw.mtl │ ├── overDraw.effect.meta │ ├── TimeScale.ts │ ├── overDraw.effect │ ├── EasyMenu.prefab │ └── CommonDebug.ts ├── bundles │ ├── bundle3 │ │ ├── preload │ │ │ ├── Sounds │ │ │ │ ├── bgm.mp3 │ │ │ │ └── bgm.mp3.meta │ │ │ ├── Skybox │ │ │ │ ├── factory.jpg │ │ │ │ └── factory.jpg.meta │ │ │ ├── Skybox.meta │ │ │ └── Sounds.meta │ │ └── preload.meta │ ├── bundle2 │ │ ├── preload.meta │ │ └── preload │ │ │ ├── Prefabs.meta │ │ │ └── Prefabs │ │ │ ├── Models.prefab.meta │ │ │ └── Models.prefab │ ├── bundle2.meta │ ├── bundle3.meta │ ├── bundle1 │ │ ├── preload.meta │ │ └── preload │ │ │ ├── Prefabs.meta │ │ │ └── Prefabs │ │ │ ├── Plane.prefab.meta │ │ │ └── Plane.prefab │ └── bundle1.meta ├── scripts │ ├── SceneMgr.ts.meta │ ├── LoadingMgr.ts.meta │ ├── frame │ │ ├── Enums.ts.meta │ │ ├── ResMgr.ts.meta │ │ ├── SoundMgr.ts.meta │ │ ├── SoundMgr.ts │ │ └── Enums.ts │ ├── frame.meta │ ├── orbit-camera.ts.meta │ ├── LoadingMgr.ts │ ├── SceneMgr.ts │ └── orbit-camera.ts ├── scene.scene.meta ├── res.meta ├── bundles.meta ├── easyMenu.meta ├── prefabs.meta ├── scripts.meta └── prefabs │ ├── PBR Test.prefab.meta │ ├── Toon Test.prefab.meta │ ├── Unlit Test.prefab.meta │ ├── DefaultScene.prefab.meta │ ├── Lambert Test.prefab.meta │ ├── Outline Test.prefab.meta │ ├── BlinnPhong Test.prefab.meta │ ├── HalfLambert Test.prefab.meta │ └── Instancing Test.prefab.meta ├── package.json ├── tsconfig.json ├── .gitignore └── README.md /settings/v2/packages/device.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.1" 3 | } 4 | -------------------------------------------------------------------------------- /settings/v2/packages/program.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.3" 3 | } 4 | -------------------------------------------------------------------------------- /assets/res/low.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/low.jpg -------------------------------------------------------------------------------- /assets/res/textures/auto-atlas.pac: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.SpriteAtlas" 3 | } 4 | -------------------------------------------------------------------------------- /assets/easyMenu/sprites/auto-atlas.pac: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.SpriteAtlas" 3 | } 4 | -------------------------------------------------------------------------------- /assets/res/model/Atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/model/Atlas.png -------------------------------------------------------------------------------- /assets/res/model/normal/ao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/model/normal/ao.jpg -------------------------------------------------------------------------------- /assets/res/model/normal/pbr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/model/normal/pbr.jpg -------------------------------------------------------------------------------- /assets/res/textures/miaomiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/textures/miaomiao.png -------------------------------------------------------------------------------- /assets/easyMenu/sprites/bmfont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/easyMenu/sprites/bmfont.png -------------------------------------------------------------------------------- /assets/res/model/normal/normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/model/normal/normal.jpg -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Albedo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/mat/floor/Tile_Albedo.jpg -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/mat/floor/Tile_Normal.jpg -------------------------------------------------------------------------------- /assets/res/model/normal/diffuse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/model/normal/diffuse.jpg -------------------------------------------------------------------------------- /assets/res/model/Mech_BarbaraTheBee.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/model/Mech_BarbaraTheBee.fbx -------------------------------------------------------------------------------- /assets/easyMenu/sprites/sprite_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/easyMenu/sprites/sprite_splash.png -------------------------------------------------------------------------------- /settings/v2/packages/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.3.4", 3 | "splash-setting": { 4 | "totalTime": 1000 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /assets/bundles/bundle3/preload/Sounds/bgm.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/bundles/bundle3/preload/Sounds/bgm.mp3 -------------------------------------------------------------------------------- /assets/bundles/bundle3/preload/Skybox/factory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/bundles/bundle3/preload/Skybox/factory.jpg -------------------------------------------------------------------------------- /assets/easyMenu/sprites/default_toggle_checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/easyMenu/sprites/default_toggle_checkmark.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LightModel", 3 | "uuid": "a2e5a39d-3c09-441b-a1f6-bdaf3cf8d754", 4 | "creator": { 5 | "version": "3.7.2" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eEdit.ts.meta: -------------------------------------------------------------------------------- 1 | {"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"dadfcba0-092d-4bc3-8695-6ff970cced93","files":[],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eGraph.ts.meta: -------------------------------------------------------------------------------- 1 | {"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"3bcf232e-1c97-4995-acd9-9adf8fe9469f","files":[],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eGroup.ts.meta: -------------------------------------------------------------------------------- 1 | {"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"c341d94c-e4ea-4d86-bb06-8db21f3af067","files":[],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eList.ts.meta: -------------------------------------------------------------------------------- 1 | {"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"a201ff86-189c-4b4b-bebf-bc4084876c5d","files":[],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eSlider.ts.meta: -------------------------------------------------------------------------------- 1 | {"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"b79ef929-fdc2-4288-bd1d-23d99361ce94","files":[],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eToggle.ts.meta: -------------------------------------------------------------------------------- 1 | {"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"3c87fcba-c739-49ab-a9b4-71d27a7d3340","files":[],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/effect/Lambert.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.6.3","importer":"effect","imported":true,"uuid":"0cc8d39a-486b-417f-86ab-d81d643f002a","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/ball/Lambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"f678f34c-6815-4be6-97e7-f60bd5f3bbf2","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/ball/unlit.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"4c204c88-aa8f-421a-b195-d6ea9a402989","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Lambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"9270e552-cc2f-43c0-aee2-54876cebefa1","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/PBR.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"bf1a5b33-e7c0-41d8-a072-a1ad468aa5e5","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Toon.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"618747a5-49b4-4d2b-90ed-b15f27197b5d","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/unlit.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"adc63bf0-3824-4432-a629-b409d82e43c7","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/effect/HalfLambert.effect.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.6.3","importer":"effect","imported":true,"uuid":"1b403630-12eb-4b45-b0f6-a64c80b89d58","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/ball/HalfLambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"62724f57-4bd4-4002-859d-5e295aa73eba","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/HalfLambert.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"3fff4d99-a683-491c-97fc-747b7507af0b","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/robot/instancing.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"35361dec-d382-4c3d-b2f4-4d4b127a5bb8","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/res/mat/floor/floorBlinnPhong.mtl.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.0.20","importer":"material","imported":true,"uuid":"d4412da5-69a5-43d4-ad62-b85bb66b53af","files":[".json"],"subMetas":{},"userData":{}} 2 | -------------------------------------------------------------------------------- /assets/bundles/bundle2/preload.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.0","importer":"directory","imported":true,"uuid":"b5a7b2c1-d1b0-45da-ae41-737ab6d339cc","files":[],"subMetas":{},"userData":{"compressionType":{},"isRemoteBundle":{}}} 2 | -------------------------------------------------------------------------------- /assets/bundles/bundle3/preload.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.0","importer":"directory","imported":true,"uuid":"7d50cf28-a0f4-491e-a15c-417ebe76ed93","files":[],"subMetas":{},"userData":{"compressionType":{},"isRemoteBundle":{}}} 2 | -------------------------------------------------------------------------------- /assets/bundles/bundle2/preload/Prefabs.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.0","importer":"directory","imported":true,"uuid":"38c49b3b-ee04-49c2-88e1-48d78ffb4170","files":[],"subMetas":{},"userData":{"compressionType":{},"isRemoteBundle":{}}} 2 | -------------------------------------------------------------------------------- /assets/scripts/SceneMgr.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "e71e6041-5944-40e3-803d-c49ddfe38b9b", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/easyMenu/CommonDebug.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c90d0bb4-0192-459f-941a-a8c772e3ff62", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/easyMenu/TimeScale.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "5cad54bb-837d-462d-927a-5799e6548550", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eItem.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "296065f6-8830-48a4-ae91-0875b89a0fb9", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eMenu.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "6d258c91-78d5-421e-9ddb-1ec8bfc4e307", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/LoadingMgr.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "c93b2324-6208-41e1-9877-5543be2fa272", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/frame/Enums.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "39f4c079-9810-43f8-bd3e-c0630362f25e", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | /* Base configuration. Do not edit this field. */ 3 | "extends": "./temp/tsconfig.cocos.json", 4 | 5 | /* Add your custom configuration here. */ 6 | "compilerOptions": { 7 | "strict": false 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /assets/res/textures/iwaecat_cat_girl_toon__cel_shading_beautiful_1240b7e5-6b4f-42bb-8f6d-403abf1f7633.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwae/easyMenu/HEAD/assets/res/textures/iwaecat_cat_girl_toon__cel_shading_beautiful_1240b7e5-6b4f-42bb-8f6d-403abf1f7633.jpg -------------------------------------------------------------------------------- /assets/scene.scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "scene", 4 | "imported": true, 5 | "uuid": "9ba17609-ceb2-40ee-baa0-4c9be490ebc8", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/scripts/frame/ResMgr.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "9d1933b3-a781-4317-8a30-38135e35cef6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/scripts/frame/SoundMgr.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "bf1290b9-ac47-48c8-a412-b53ef627c938", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/bundles/bundle2.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.0","importer":"directory","imported":true,"uuid":"4709f3fd-6ea0-43c9-b90f-e4b219db0512","files":[],"subMetas":{},"userData":{"compressionType":{"wechatgame":"subpackage"},"isRemoteBundle":{"wechatgame":false},"isBundle":true}} 2 | -------------------------------------------------------------------------------- /assets/bundles/bundle3.meta: -------------------------------------------------------------------------------- 1 | {"ver":"1.1.0","importer":"directory","imported":true,"uuid":"4b771688-5c92-45d7-a716-dca150b53b8a","files":[],"subMetas":{},"userData":{"compressionType":{"wechatgame":"subpackage"},"isRemoteBundle":{"wechatgame":false},"isBundle":true}} 2 | -------------------------------------------------------------------------------- /assets/easyMenu/overDraw.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "ba782568-a8a8-4138-bcf9-1caffc6c3ff3", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/ball/pbr.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "da8459fd-00d3-4c5d-96be-dd6af6321467", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/ball/toon.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "6bb6cd6d-61da-465d-8e32-01b462c05474", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/effect/Blinn-Phong.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.6.3", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "26d250a3-731a-4886-a39d-4464727e18e9", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/Depth-Text.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "14f5bd40-dc98-49b6-b524-016ca00dcda3", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/floor/floorPBR.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "9411b7df-bb2c-409c-9f23-a41d46d325ca", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/effect/Toon-Shading.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.6.3", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/ball/blinnphong.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "c0f80241-b441-456d-bf09-d70972dc275d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Blinn-Phong.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "1f6cd25a-05a1-4625-93e2-984cc2933ef4", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res/mat/robot/ToonOutline.mtl.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.20", 3 | "importer": "material", 4 | "imported": true, 5 | "uuid": "fac91bfb-a21a-425f-8ead-e3c5106e86db", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": {} 11 | } 12 | -------------------------------------------------------------------------------- /assets/res.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0e75ae5b-da7f-4a6d-a3c8-fdcce2f1cd01", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/bundles.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "9cac2083-ea18-499f-8fcc-d0b812ac88a5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/easyMenu.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "4ca8b66c-7bef-4589-a8bf-003669489f46", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/prefabs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "f1e231de-6c71-45b8-8f37-a44d9ec32f66", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "0f9c12ec-6221-420a-ba6f-b171a97ac923", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "87fd4071-06e8-4d4a-8b0a-7831003e73e0", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/model.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "50010d68-4e78-47da-becb-7df6fafafae5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/prefabs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "3922ce52-7972-4709-bb67-39aeeaa508a6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/scripts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "1d417d61-5905-4957-b23d-7355bbcb601d", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /settings/v2/packages/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.4", 3 | "general": { 4 | "designResolution": { 5 | "width": 1334, 6 | "height": 750, 7 | "fitWidth": false, 8 | "fitHeight": true 9 | } 10 | }, 11 | "custom_joint_texture_layouts": [] 12 | } 13 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "5a0ba73b-7436-4658-86f0-d506af176f35", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/easyMenu/sprites.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "415b6772-fb56-4452-bcf9-2f378bfb4b03", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/easyMenu/src.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "78e9aac2-c12a-49a5-93d8-fbf43fce638c", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat/ball.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "5aa83ff9-7db6-4c22-9440-2d49c84d0179", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat/floor.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "d7ff399a-a854-4009-8877-7f184a8265ce", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/mat/robot.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "12122200-4f40-423c-8e85-5d81f3f83159", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/model/normal.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "fffd6858-3212-4edc-bb52-3d99ed805496", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/res/textures.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "4df68284-dca3-4ce6-8944-786d600d01cd", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/scripts/frame.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "ddfa202b-d566-4dc5-8d07-05c8e1c2e77a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/easyMenu/EasyMenu.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "3621824e-0509-4261-b05b-5c9c20873397", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasyMenu" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/PBR Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "db416a7a-ef50-4c24-b749-1780b81ee556", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "PBR Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/bundles/bundle1/preload.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "d75c8aed-c9ba-471e-93aa-5537faaf4990", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/prefabs/Toon Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "31514b02-a618-4ee4-acfa-a2b5b215730a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Toon Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Unlit Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "c974daa1-812c-40d3-bbb1-c65328082b95", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Unlit Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/res/prefabs/menuItem.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "b5cf5cf7-d298-4eb0-90cc-9d1d2f6bd67d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "menuItem" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/bundles/bundle1/preload/Prefabs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "919e6298-5e91-47ef-a3d7-c5711e714172", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/bundles/bundle3/preload/Skybox.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "298192b7-5e73-4422-89de-86c757fc1989", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/bundles/bundle3/preload/Sounds.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "53c87251-ef34-44f7-99f3-eb3c9c4ce7b6", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": {}, 10 | "isRemoteBundle": {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs/EasyEdit.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "af927205-ae06-456e-9831-980d685022be", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasyEdit" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs/EasyGraph.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "d4b015a8-a6a0-44bb-934d-f80878624a94", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasyGraph" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs/EasyGroup.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "c503038e-02a6-4c0b-aac9-76153754d1c5", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasyGroup" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs/EasyItem.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "cc9403fe-0b8e-4f43-afca-42fe22b9d9f2", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasyItem" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs/EasyList.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "5b3053e1-40ca-4d79-af13-1898b3503cbb", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasyList" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/DefaultScene.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "56172057-5403-41cd-8526-921a8b49ff52", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "DefaultScene" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Lambert Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "2bf0d501-6245-4dc4-9eb2-42e1535e9112", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Lambert Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Outline Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "6a241440-d903-4869-a21e-867939eb6aed", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Outline Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/res/prefabs/SelectMenu.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "253d3103-f912-4892-a436-ef886a66baab", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "SelectMenu" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs/EasySlider.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "bad5b143-c6fa-4182-ae62-a2ee3b0c0c3a", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasySlider" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/easyMenu/prefabs/EasyToggle.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "dd65b6d5-7f5e-4dab-bbbd-eb665fdc5255", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "EasyToggle" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/BlinnPhong Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "16289bab-2c64-4055-af8f-423b03fc4457", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "BlinnPhong Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/HalfLambert Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "da73c735-2798-449b-9cb3-1411a4b4a33f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "HalfLambert Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/prefabs/Instancing Test.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "57c9dcbb-cdf5-4d38-94ab-1a2371c1c1c0", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Instancing Test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/bundles/bundle1/preload/Prefabs/Plane.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "3b258214-244a-4769-8694-c24bade4ebbb", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Plane" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/bundles/bundle2/preload/Prefabs/Models.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.43", 3 | "importer": "prefab", 4 | "imported": true, 5 | "uuid": "7a8e2cd7-798a-45e7-bf04-a1722e66025d", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "syncNodeName": "Models" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/bundles/bundle3/preload/Sounds/bgm.mp3.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "importer": "audio-clip", 4 | "imported": true, 5 | "uuid": "6d5fb277-de81-46b8-ad4c-1b992b5390b0", 6 | "files": [ 7 | ".json", 8 | ".mp3" 9 | ], 10 | "subMetas": {}, 11 | "userData": { 12 | "downloadMode": 0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /assets/scripts/orbit-camera.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "4.0.23", 3 | "importer": "typescript", 4 | "imported": true, 5 | "uuid": "6be7df01-865a-4916-86ed-324c4c5ef55a", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "moduleId": "project:///assets/src/utils/orbit-camera.js", 10 | "importerSettings": 4, 11 | "simulateGlobals": [] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/bundles/bundle1.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.1.0", 3 | "importer": "directory", 4 | "imported": true, 5 | "uuid": "c7bef883-2ced-46e1-ac65-c137acc386d5", 6 | "files": [], 7 | "subMetas": {}, 8 | "userData": { 9 | "compressionType": { 10 | "wechatgame": "subpackage" 11 | }, 12 | "isRemoteBundle": { 13 | "wechatgame": false 14 | }, 15 | "isBundle": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | #/////////////////////////// 3 | # Cocos Creator 3D Project 4 | #/////////////////////////// 5 | library/ 6 | temp/ 7 | local/ 8 | build/ 9 | profiles/ 10 | #////////////////////////// 11 | # NPM 12 | #////////////////////////// 13 | node_modules/ 14 | 15 | #////////////////////////// 16 | # VSCode 17 | #////////////////////////// 18 | .vscode/ 19 | 20 | #////////////////////////// 21 | # WebStorm 22 | #////////////////////////// 23 | .idea/ 24 | other/ -------------------------------------------------------------------------------- /settings/v2/packages/cocos-service.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "3.0.7", 3 | "game": { 4 | "name": "UNKNOW GAME", 5 | "app_id": "UNKNOW", 6 | "c_id": "0" 7 | }, 8 | "appConfigMaps": [ 9 | { 10 | "app_id": "UNKNOW", 11 | "config_id": "3ec565" 12 | } 13 | ], 14 | "configs": [ 15 | { 16 | "app_id": "UNKNOW", 17 | "config_id": "3ec565", 18 | "config_name": "Default", 19 | "config_remarks": "", 20 | "services": [] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /assets/easyMenu/overDraw.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "d69cc5f7-acff-4845-9657-4bdd254903e3", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | {} 13 | ], 14 | "_states": [ 15 | { 16 | "rasterizerState": {}, 17 | "depthStencilState": {}, 18 | "blendState": { 19 | "targets": [ 20 | { 21 | "blendDstAlpha": 1 22 | } 23 | ] 24 | } 25 | } 26 | ], 27 | "_props": [ 28 | {} 29 | ] 30 | } -------------------------------------------------------------------------------- /assets/res/mat/Depth-Text.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "60f7195c-ec2a-45eb-ba94-8955f60e81d0", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_TEXTURE": true 14 | } 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": { 20 | "depthTest": true, 21 | "depthWrite": true 22 | }, 23 | "blendState": { 24 | "targets": [ 25 | {} 26 | ] 27 | } 28 | } 29 | ], 30 | "_props": [ 31 | {} 32 | ] 33 | } -------------------------------------------------------------------------------- /assets/easyMenu/overDraw.effect.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.6.3", 3 | "importer": "effect", 4 | "imported": true, 5 | "uuid": "d69cc5f7-acff-4845-9657-4bdd254903e3", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "combinations": [ 12 | { 13 | "USE_LOCAL": [ 14 | false 15 | ], 16 | "SAMPLE_FROM_RT": [ 17 | false 18 | ], 19 | "USE_PIXEL_ALIGNMENT": [ 20 | false 21 | ], 22 | "USE_ALPHA_TEST": [ 23 | false 24 | ], 25 | "USE_TEXTURE": [ 26 | false 27 | ], 28 | "IS_GRAY": [ 29 | false 30 | ] 31 | } 32 | ] 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /assets/res/mat/ball/unlit.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_TEXTURE": true 14 | } 15 | ], 16 | "_states": [ 17 | { 18 | "rasterizerState": {}, 19 | "depthStencilState": {}, 20 | "blendState": { 21 | "targets": [ 22 | {} 23 | ] 24 | } 25 | } 26 | ], 27 | "_props": [ 28 | { 29 | "mainTexture": { 30 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 31 | "__expectedType__": "cc.Texture2D" 32 | } 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /assets/easyMenu/TimeScale.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: your name 3 | * @Date: 2022-01-20 11:26:15 4 | * @LastEditTime: 2023-08-30 10:25:04 5 | * @LastEditors: chenyang.sun chenyang.sun@cocos.com 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE 7 | * @FilePath: \AssaHunterMaster\assets\Scripts\DirectorOverwrite.ts 8 | */ 9 | 10 | import { _decorator, Component, director } from 'cc'; 11 | const { ccclass } = _decorator; 12 | 13 | @ccclass('TimeScale') 14 | export class TimeScale extends Component { 15 | static scale = 1 16 | start () { 17 | const originalTick = director.tick; 18 | director.tick = (dt: number) => { 19 | dt *= TimeScale.scale; 20 | originalTick.call(director, dt); 21 | } 22 | } 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /assets/res/mat/robot/unlit.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "a3cd009f-0ab0-420d-9278-b9fdab939bbc", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_TEXTURE": true, 14 | "ALPHA_TEST_CHANNEL": "r" 15 | } 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | } 27 | ], 28 | "_props": [ 29 | { 30 | "mainTexture": { 31 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 32 | "__expectedType__": "cc.Texture2D" 33 | } 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /assets/res/textures/auto-atlas.pac.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.8", 3 | "importer": "auto-atlas", 4 | "imported": true, 5 | "uuid": "d422aee8-5cc6-42ec-960b-c5ed4e5bf60f", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "maxWidth": 1024, 12 | "maxHeight": 1024, 13 | "padding": 2, 14 | "allowRotation": true, 15 | "forceSquared": false, 16 | "powerOfTwo": false, 17 | "algorithm": "MaxRects", 18 | "format": "png", 19 | "quality": 80, 20 | "contourBleed": true, 21 | "paddingBleed": true, 22 | "filterUnused": true, 23 | "removeTextureInBundle": true, 24 | "removeImageInBundle": true, 25 | "removeSpriteAtlasInBundle": true, 26 | "compressSettings": {}, 27 | "textureSetting": { 28 | "wrapModeS": "repeat", 29 | "wrapModeT": "repeat", 30 | "minfilter": "linear", 31 | "magfilter": "linear", 32 | "mipfilter": "none", 33 | "anisotropy": 0 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /assets/easyMenu/sprites/auto-atlas.pac.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.8", 3 | "importer": "auto-atlas", 4 | "imported": true, 5 | "uuid": "7851614d-bb5d-4dfa-a1af-698bf5b07ce1", 6 | "files": [ 7 | ".json" 8 | ], 9 | "subMetas": {}, 10 | "userData": { 11 | "maxWidth": 1024, 12 | "maxHeight": 1024, 13 | "padding": 2, 14 | "allowRotation": true, 15 | "forceSquared": false, 16 | "powerOfTwo": false, 17 | "algorithm": "MaxRects", 18 | "format": "png", 19 | "quality": 80, 20 | "contourBleed": true, 21 | "paddingBleed": true, 22 | "filterUnused": true, 23 | "removeTextureInBundle": true, 24 | "removeImageInBundle": true, 25 | "removeSpriteAtlasInBundle": true, 26 | "compressSettings": {}, 27 | "textureSetting": { 28 | "wrapModeS": "repeat", 29 | "wrapModeT": "repeat", 30 | "minfilter": "linear", 31 | "magfilter": "linear", 32 | "mipfilter": "none", 33 | "anisotropy": 0 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /assets/res/model/Atlas.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "f6991aef-7f02-4d23-b5f1-48040b943c9a", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 14 | "displayName": "Atlas", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "f6991aef-7f02-4d23-b5f1-48040b943c9a", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/ao.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6ee1a690-5763-4496-90d5-b8895bd3d249", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "6ee1a690-5763-4496-90d5-b8895bd3d249@6c48a", 14 | "displayName": "ao", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6ee1a690-5763-4496-90d5-b8895bd3d249", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "6ee1a690-5763-4496-90d5-b8895bd3d249@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/pbr.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "f6134021-c72b-4a0b-8c14-b9e6e454925a", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "f6134021-c72b-4a0b-8c14-b9e6e454925a@6c48a", 14 | "displayName": "pbr", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "f6134021-c72b-4a0b-8c14-b9e6e454925a", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "f6134021-c72b-4a0b-8c14-b9e6e454925a@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/normal.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "f0f6ff34-bd30-4d43-a22c-d675857c244e", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 14 | "displayName": "normal", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "f0f6ff34-bd30-4d43-a22c-d675857c244e", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/model/normal/diffuse.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 14 | "displayName": "diffuse", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "nearest", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Albedo.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 14 | "displayName": "Tile_Albedo", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/mat/floor/Tile_Normal.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "8b42b8da-a486-4495-8f73-45db33830247", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "8b42b8da-a486-4495-8f73-45db33830247@6c48a", 14 | "displayName": "Tile_Normal", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "8b42b8da-a486-4495-8f73-45db33830247", 26 | "visible": true 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | } 35 | }, 36 | "userData": { 37 | "fixAlphaTransparencyArtifacts": true, 38 | "hasAlpha": false, 39 | "type": "texture", 40 | "redirect": "8b42b8da-a486-4495-8f73-45db33830247@6c48a" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /assets/res/mat/robot/Lambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "0cc8d39a-486b-417f-86ab-d81d643f002a", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {} 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | }, 27 | { 28 | "rasterizerState": {}, 29 | "depthStencilState": {}, 30 | "blendState": { 31 | "targets": [ 32 | {} 33 | ] 34 | } 35 | } 36 | ], 37 | "_props": [ 38 | { 39 | "mainTexture": { 40 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 41 | "__expectedType__": "cc.Texture2D" 42 | }, 43 | "mainColor": { 44 | "__type__": "cc.Color", 45 | "r": 240, 46 | "g": 240, 47 | "b": 240, 48 | "a": 255 49 | }, 50 | "rimLightColor": { 51 | "__type__": "cc.Color", 52 | "r": 255, 53 | "g": 255, 54 | "b": 255, 55 | "a": 0 56 | }, 57 | "shininess": 0 58 | }, 59 | {} 60 | ] 61 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/Blinn-Phong.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {} 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | }, 27 | { 28 | "rasterizerState": {}, 29 | "depthStencilState": {}, 30 | "blendState": { 31 | "targets": [ 32 | {} 33 | ] 34 | } 35 | } 36 | ], 37 | "_props": [ 38 | { 39 | "mainTexture": { 40 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 41 | "__expectedType__": "cc.Texture2D" 42 | }, 43 | "mainColor": { 44 | "__type__": "cc.Color", 45 | "r": 240, 46 | "g": 240, 47 | "b": 240, 48 | "a": 255 49 | }, 50 | "rimLightColor": { 51 | "__type__": "cc.Color", 52 | "r": 255, 53 | "g": 255, 54 | "b": 255, 55 | "a": 0 56 | }, 57 | "shininess": 0.5 58 | }, 59 | {} 60 | ] 61 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/Lambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "0cc8d39a-486b-417f-86ab-d81d643f002a", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {} 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | }, 28 | { 29 | "rasterizerState": {}, 30 | "depthStencilState": {}, 31 | "blendState": { 32 | "targets": [ 33 | {} 34 | ] 35 | } 36 | } 37 | ], 38 | "_props": [ 39 | { 40 | "mainTexture": { 41 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 42 | "__expectedType__": "cc.Texture2D" 43 | }, 44 | "mainColor": { 45 | "__type__": "cc.Color", 46 | "r": 255, 47 | "g": 255, 48 | "b": 255, 49 | "a": 255 50 | }, 51 | "normalMap": { 52 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 53 | "__expectedType__": "cc.Texture2D" 54 | }, 55 | "normalStrength": 1.795 56 | }, 57 | {} 58 | ] 59 | } -------------------------------------------------------------------------------- /assets/easyMenu/overDraw.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd. 2 | CCEffect %{ 3 | techniques: 4 | - passes: 5 | - vert: sprite-vs:vert 6 | frag: sprite-fs:frag 7 | depthStencilState: 8 | depthTest: false 9 | depthWrite: false 10 | blendState: 11 | targets: 12 | - blend: true 13 | blendSrc: src_alpha 14 | blendDst: one_minus_src_alpha 15 | blendDstAlpha: one_minus_src_alpha 16 | rasterizerState: 17 | cullMode: none 18 | properties: 19 | }% 20 | 21 | CCProgram sprite-vs %{ 22 | precision highp float; 23 | #include 24 | 25 | in vec3 a_position; 26 | in vec2 a_texCoord; 27 | in vec4 a_color; 28 | 29 | out vec4 color; 30 | out vec2 uv0; 31 | 32 | vec4 vert () { 33 | vec4 pos = vec4(a_position, 1); 34 | 35 | 36 | pos = cc_matViewProj * pos; 37 | 38 | uv0 = a_texCoord; 39 | 40 | color = a_color; 41 | 42 | return pos; 43 | } 44 | }% 45 | 46 | CCProgram sprite-fs %{ 47 | precision highp float; 48 | #include 49 | 50 | in vec4 color; 51 | in vec2 uv0; 52 | #pragma builtin(local) 53 | layout(set = 2, binding = 12) uniform sampler2D cc_spriteTexture; 54 | 55 | vec4 frag () { 56 | vec4 final = vec4(0.7,0.,0.,0.25); 57 | return final; 58 | } 59 | }% 60 | -------------------------------------------------------------------------------- /assets/res/mat/ball/HalfLambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1b403630-12eb-4b45-b0f6-a64c80b89d58", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {} 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | }, 28 | { 29 | "rasterizerState": {}, 30 | "depthStencilState": {}, 31 | "blendState": { 32 | "targets": [ 33 | {} 34 | ] 35 | } 36 | } 37 | ], 38 | "_props": [ 39 | { 40 | "mainTexture": { 41 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 42 | "__expectedType__": "cc.Texture2D" 43 | }, 44 | "mainColor": { 45 | "__type__": "cc.Color", 46 | "r": 255, 47 | "g": 255, 48 | "b": 255, 49 | "a": 255 50 | }, 51 | "normalMap": { 52 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 53 | "__expectedType__": "cc.Texture2D" 54 | }, 55 | "normalStrength": 2.185 56 | }, 57 | {} 58 | ] 59 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/instancing.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_INSTANCING": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | { 17 | "USE_INSTANCING": true 18 | } 19 | ], 20 | "_states": [ 21 | { 22 | "rasterizerState": {}, 23 | "depthStencilState": {}, 24 | "blendState": { 25 | "targets": [ 26 | {} 27 | ] 28 | } 29 | }, 30 | { 31 | "rasterizerState": {}, 32 | "depthStencilState": {}, 33 | "blendState": { 34 | "targets": [ 35 | {} 36 | ] 37 | } 38 | } 39 | ], 40 | "_props": [ 41 | { 42 | "mainTexture": { 43 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 44 | "__expectedType__": "cc.Texture2D" 45 | }, 46 | "mainColor": { 47 | "__type__": "cc.Color", 48 | "r": 240, 49 | "g": 240, 50 | "b": 240, 51 | "a": 255 52 | }, 53 | "rimLightColor": { 54 | "__type__": "cc.Color", 55 | "r": 255, 56 | "g": 255, 57 | "b": 255, 58 | "a": 0 59 | } 60 | }, 61 | {} 62 | ] 63 | } -------------------------------------------------------------------------------- /assets/res/mat/ball/blinnphong.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {} 17 | ], 18 | "_states": [ 19 | { 20 | "rasterizerState": {}, 21 | "depthStencilState": {}, 22 | "blendState": { 23 | "targets": [ 24 | {} 25 | ] 26 | } 27 | }, 28 | { 29 | "rasterizerState": {}, 30 | "depthStencilState": {}, 31 | "blendState": { 32 | "targets": [ 33 | {} 34 | ] 35 | } 36 | } 37 | ], 38 | "_props": [ 39 | { 40 | "mainTexture": { 41 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 42 | "__expectedType__": "cc.Texture2D" 43 | }, 44 | "mainColor": { 45 | "__type__": "cc.Color", 46 | "r": 238, 47 | "g": 238, 48 | "b": 238, 49 | "a": 255 50 | }, 51 | "shininess": 0.456, 52 | "normalMap": { 53 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 54 | "__expectedType__": "cc.Texture2D" 55 | }, 56 | "normalStrength": 2 57 | }, 58 | {} 59 | ] 60 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/HalfLambert.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1b403630-12eb-4b45-b0f6-a64c80b89d58", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {} 16 | ], 17 | "_states": [ 18 | { 19 | "rasterizerState": {}, 20 | "depthStencilState": {}, 21 | "blendState": { 22 | "targets": [ 23 | {} 24 | ] 25 | } 26 | }, 27 | { 28 | "rasterizerState": {}, 29 | "depthStencilState": {}, 30 | "blendState": { 31 | "targets": [ 32 | {} 33 | ] 34 | } 35 | } 36 | ], 37 | "_props": [ 38 | { 39 | "mainTexture": { 40 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 41 | "__expectedType__": "cc.Texture2D" 42 | }, 43 | "mainColor": { 44 | "__type__": "cc.Color", 45 | "r": 240, 46 | "g": 240, 47 | "b": 240, 48 | "a": 255 49 | }, 50 | "rimLightColor": { 51 | "__type__": "cc.Color", 52 | "r": 255, 53 | "g": 255, 54 | "b": 255, 55 | "a": 0 56 | }, 57 | "diffuseWrap": 0.573, 58 | "shininess": 0.949, 59 | "roughness": 0 60 | }, 61 | {} 62 | ] 63 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/PBR.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "c8f66d17-351a-48da-a12c-0212d28575c4", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true 14 | }, 15 | {}, 16 | {}, 17 | {} 18 | ], 19 | "_states": [ 20 | { 21 | "rasterizerState": {}, 22 | "depthStencilState": {}, 23 | "blendState": { 24 | "targets": [ 25 | {} 26 | ] 27 | } 28 | }, 29 | { 30 | "rasterizerState": {}, 31 | "depthStencilState": {}, 32 | "blendState": { 33 | "targets": [ 34 | {} 35 | ] 36 | } 37 | }, 38 | { 39 | "rasterizerState": {}, 40 | "depthStencilState": {}, 41 | "blendState": { 42 | "targets": [ 43 | {} 44 | ] 45 | } 46 | }, 47 | { 48 | "rasterizerState": {}, 49 | "depthStencilState": {}, 50 | "blendState": { 51 | "targets": [ 52 | {} 53 | ] 54 | } 55 | } 56 | ], 57 | "_props": [ 58 | { 59 | "roughness": 0.395, 60 | "metallic": 0.296, 61 | "specularIntensity": 0.279, 62 | "mainTexture": { 63 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 64 | "__expectedType__": "cc.Texture2D" 65 | } 66 | }, 67 | {}, 68 | {}, 69 | {} 70 | ] 71 | } -------------------------------------------------------------------------------- /assets/scripts/LoadingMgr.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Component, director, lerp, Sprite } from 'cc'; 2 | import res from './frame/ResMgr'; 3 | import { AssetType } from './frame/Enums'; 4 | import { sceneMgr } from './SceneMgr'; 5 | import { eMenu } from '../easyMenu/src/eMenu'; 6 | import sound from './frame/SoundMgr'; 7 | const { ccclass, property } = _decorator; 8 | 9 | @ccclass('loadingMgr') 10 | export class loadingMgr extends Component { 11 | @property(Sprite) bar:Sprite; 12 | end = false; 13 | async start() { 14 | res._debug = true; 15 | /* load bundles */ 16 | await res.loadBundle(1,0.1); 17 | await res.loadBundle(2,0.05); 18 | await res.loadBundle(3,0.05); 19 | 20 | /* load res based on types */ 21 | await res.loadRes(1,AssetType.Prefab,0.2); 22 | await res.loadRes(2,AssetType.Prefab,0.4); 23 | await res.loadRes(3,AssetType.Skybox,0.1); 24 | await res.loadRes(3,AssetType.Sound,0.1); 25 | 26 | const root = director.getScene(); 27 | /* scene */ 28 | res.getNode("Plane",root); 29 | res.getNode("Models",root); 30 | 31 | /* skybox */ 32 | director.getScene().globals.skybox.envmap = res.getTextureCube("skybox"); 33 | /* sfx */ 34 | sound.startBgm("bgm"); 35 | /* destroy bars */ 36 | this.end = true; 37 | this.node.destroyAllChildren(); 38 | 39 | } 40 | 41 | update(deltaTime: number) { 42 | if(this.end) return; 43 | this.bar.fillRange = lerp(this.bar.fillRange,res.loadingRate,deltaTime*5); 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /assets/res/mat/floor/floorBlinnPhong.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "26d250a3-731a-4886-a39d-4464727e18e9", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_NORMAL_MAP": true, 14 | "USE_ALBEDO_MAP": true, 15 | "USE_IBL": true 16 | }, 17 | {} 18 | ], 19 | "_states": [ 20 | { 21 | "rasterizerState": {}, 22 | "depthStencilState": {}, 23 | "blendState": { 24 | "targets": [ 25 | {} 26 | ] 27 | } 28 | }, 29 | { 30 | "rasterizerState": {}, 31 | "depthStencilState": {}, 32 | "blendState": { 33 | "targets": [ 34 | {} 35 | ] 36 | } 37 | } 38 | ], 39 | "_props": [ 40 | { 41 | "mainTexture": { 42 | "__uuid__": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 43 | "__expectedType__": "cc.Texture2D" 44 | }, 45 | "tilingOffset": { 46 | "__type__": "cc.Vec4", 47 | "x": 35, 48 | "y": 35, 49 | "z": 0, 50 | "w": 0 51 | }, 52 | "mainColor": { 53 | "__type__": "cc.Color", 54 | "r": 255, 55 | "g": 255, 56 | "b": 255, 57 | "a": 255 58 | }, 59 | "shininess": 0.662, 60 | "roughness": 0.06, 61 | "emissive": { 62 | "__type__": "cc.Color", 63 | "r": 14, 64 | "g": 14, 65 | "b": 14, 66 | "a": 255 67 | }, 68 | "normalMap": { 69 | "__uuid__": "8b42b8da-a486-4495-8f73-45db33830247@6c48a", 70 | "__expectedType__": "cc.Texture2D" 71 | }, 72 | "normalStrength": 1.2 73 | }, 74 | {} 75 | ] 76 | } -------------------------------------------------------------------------------- /assets/scripts/frame/SoundMgr.ts: -------------------------------------------------------------------------------- 1 | 2 | import { AudioSourceComponent, _decorator } from "cc"; 3 | import Res from "./ResMgr"; 4 | 5 | 6 | export class SoundMgr { 7 | /** 8 | * 音乐和单次音效播放 9 | */ 10 | private _audioComp: AudioSourceComponent = new AudioSourceComponent();; 11 | /** 12 | * 循环音效播放 13 | */ 14 | private _audioLoopComp: AudioSourceComponent = new AudioSourceComponent();; 15 | private _effectComp: AudioSourceComponent = new AudioSourceComponent();; 16 | private _curLoopAudioName: string = ""; 17 | 18 | 19 | public startBgm (audio?: string, isLoop: boolean = true) { 20 | if (!audio && this._audioComp.clip) { 21 | this._audioComp.play(); 22 | return; 23 | } 24 | if (!audio) return; 25 | let clip = Res.getClip(audio); 26 | this._audioComp.clip = clip; 27 | this._audioComp.loop = isLoop; 28 | this._audioComp.play(); 29 | } 30 | 31 | public stopBgm() { 32 | this._audioComp.stop(); 33 | } 34 | 35 | public play(audio: string, scale = 0.5) { 36 | let clip = Res.getClip(audio); 37 | this._effectComp.playOneShot(clip, scale); 38 | } 39 | /** 40 | * @description: Play loop Audio 41 | * @param {string} audio 42 | * @return {*} 43 | */ 44 | public loop(audio: string) { 45 | 46 | let clip = Res.getClip(audio); 47 | this._audioLoopComp.stop(); 48 | this._audioLoopComp.clip = clip; 49 | this._audioLoopComp.loop = true; 50 | this._audioLoopComp.play(); 51 | this._curLoopAudioName = audio; 52 | } 53 | 54 | public stoploop() { 55 | this._audioLoopComp.stop(); 56 | } 57 | 58 | } 59 | 60 | const sound = new SoundMgr; 61 | 62 | export default sound; -------------------------------------------------------------------------------- /assets/res/mat/ball/pbr.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "c8f66d17-351a-48da-a12c-0212d28575c4", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true, 14 | "USE_NORMAL_MAP": true, 15 | "USE_PBR_MAP": true 16 | }, 17 | {}, 18 | {}, 19 | {} 20 | ], 21 | "_states": [ 22 | { 23 | "rasterizerState": {}, 24 | "depthStencilState": {}, 25 | "blendState": { 26 | "targets": [ 27 | {} 28 | ] 29 | } 30 | }, 31 | { 32 | "rasterizerState": {}, 33 | "depthStencilState": {}, 34 | "blendState": { 35 | "targets": [ 36 | {} 37 | ] 38 | } 39 | }, 40 | { 41 | "rasterizerState": {}, 42 | "depthStencilState": {}, 43 | "blendState": { 44 | "targets": [ 45 | {} 46 | ] 47 | } 48 | }, 49 | { 50 | "rasterizerState": {}, 51 | "depthStencilState": {}, 52 | "blendState": { 53 | "targets": [ 54 | {} 55 | ] 56 | } 57 | } 58 | ], 59 | "_props": [ 60 | { 61 | "occlusion": 0.635, 62 | "normalStrength": 2, 63 | "mainTexture": { 64 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 65 | "__expectedType__": "cc.Texture2D" 66 | }, 67 | "normalMap": { 68 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 69 | "__expectedType__": "cc.Texture2D" 70 | }, 71 | "pbrMap": { 72 | "__uuid__": "f6134021-c72b-4a0b-8c14-b9e6e454925a@6c48a", 73 | "__expectedType__": "cc.Texture2D" 74 | } 75 | }, 76 | {}, 77 | {}, 78 | {} 79 | ] 80 | } -------------------------------------------------------------------------------- /assets/easyMenu/src/eMenu.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, instantiate, Node, Prefab, Size, UITransform, Vec3 } from 'cc'; 2 | import { eGroup } from './eGroup'; 3 | const { ccclass, property, executeInEditMode } = _decorator; 4 | 5 | @ccclass('EasyMenu') 6 | @executeInEditMode(true) 7 | export class eMenu extends Component { 8 | @property(Size) 9 | set MenuItemSize(v) { 10 | this._size = v; 11 | } 12 | get MenuItemSize() { 13 | return this._size; 14 | } 15 | @property(Prefab) 16 | GroupPrefab: Prefab = null; 17 | 18 | @property({ visible: false }) 19 | private _size: Size = new Size(200, 30); 20 | private _groups = new Map; 21 | private _isVisible: boolean = true; 22 | 23 | /** 24 | * @Description: add new group to menu 25 | * @param {string} name name of menu, could be used to delete group 26 | * @return {*} 27 | */ 28 | addGroup(name?:string):eGroup{ 29 | const groupNode = instantiate(this.GroupPrefab); 30 | const easyGroup = groupNode.getComponent(eGroup); 31 | if(name){ 32 | easyGroup.groupName = name 33 | this._groups.set(name,groupNode); 34 | } 35 | easyGroup.parentComp = this; 36 | 37 | easyGroup.size = this._size; 38 | groupNode.parent = this.node; 39 | return easyGroup; 40 | }; 41 | /** 42 | * @Description: get group by name 43 | * @param {string} name 44 | * @return {*} 45 | */ 46 | getGroup(name:string){ 47 | return this._groups.get(name)||null; 48 | }; 49 | 50 | /** 51 | * @Description: delete group by name 52 | * @param {string} name 53 | * @return {*} 54 | */ 55 | deleteGroup(name:string){ 56 | const group = this.getGroup(name); 57 | if(group){ 58 | this._groups.delete(name); 59 | group.removeFromParent(); 60 | group.destroy(); 61 | } 62 | }; 63 | 64 | resetSize(node) { 65 | const tranform = node.getComponent(UITransform); 66 | tranform && tranform.setContentSize(this.MenuItemSize); 67 | }; 68 | 69 | } 70 | 71 | -------------------------------------------------------------------------------- /assets/scripts/SceneMgr.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, assetManager, AudioClip, Component, DirectionalLight, director, EventTouch, game, ImageAsset, Input, input, instantiate, Prefab, profiler, Vec2 } from 'cc'; 2 | import { eMenu } from '../easyMenu/src/eMenu'; 3 | import { TimeScale } from '../easyMenu/TimeScale'; 4 | const { ccclass, property } = _decorator; 5 | 6 | @ccclass('sceneMgr') 7 | export class sceneMgr extends Component { 8 | @property(Prefab) default: Prefab; 9 | @property(Prefab) cases: Prefab[] = []; 10 | test = 200; 11 | 12 | private _index = -1; 13 | private _prefab: Prefab = null; 14 | private _amount = 0; 15 | start() { 16 | profiler.showStats(); 17 | this.defaultScene(); 18 | this.configMenu(); 19 | } 20 | 21 | 22 | configMenu() { 23 | const menu = director.getScene().getChildByName('Canvas').getComponentInChildren(eMenu); 24 | if(!menu) return; 25 | const group = menu.addGroup("Scene"); 26 | group.addItem("Default",()=>{ 27 | this.defaultScene(); 28 | }) 29 | this.cases.forEach((c, i) => { 30 | group.addItem(c.name, () => { 31 | this.changePrefab(c, i + 1); 32 | }) 33 | }) 34 | 35 | } 36 | 37 | defaultScene() { 38 | if (this._index == 0) return; 39 | this._amount = 0; 40 | this._index = 0; 41 | this.node.destroyAllChildren(); 42 | const defaultScene = instantiate(this.default); 43 | defaultScene.parent = this.node; 44 | } 45 | changePrefab(pfb: Prefab, index = 2) { 46 | if (this._index == index) return 47 | this.node.destroyAllChildren(); 48 | this._index = index; 49 | this._prefab = pfb; 50 | this._amount = this.test; 51 | } 52 | 53 | update(deltaTime: number) { 54 | if (this._amount > 0) { 55 | const x = (this._amount % 10 - 5) * 2.6; 56 | const z = -Math.floor(this._amount / 10) * 2; 57 | const node = instantiate(this._prefab); 58 | node.parent = this.node; 59 | node.setPosition(x, 0, z); 60 | this._amount--; 61 | } 62 | 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /assets/res/mat/floor/floorPBR.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "c8f66d17-351a-48da-a12c-0212d28575c4", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_ALBEDO_MAP": true, 14 | "USE_NORMAL_MAP": true, 15 | "USE_PBR_MAP": true 16 | }, 17 | {}, 18 | {}, 19 | {} 20 | ], 21 | "_states": [ 22 | { 23 | "rasterizerState": {}, 24 | "depthStencilState": {}, 25 | "blendState": { 26 | "targets": [ 27 | {} 28 | ] 29 | } 30 | }, 31 | { 32 | "rasterizerState": {}, 33 | "depthStencilState": {}, 34 | "blendState": { 35 | "targets": [ 36 | {} 37 | ] 38 | } 39 | }, 40 | { 41 | "rasterizerState": {}, 42 | "depthStencilState": {}, 43 | "blendState": { 44 | "targets": [ 45 | {} 46 | ] 47 | } 48 | }, 49 | { 50 | "rasterizerState": {}, 51 | "depthStencilState": {}, 52 | "blendState": { 53 | "targets": [ 54 | {} 55 | ] 56 | } 57 | } 58 | ], 59 | "_props": [ 60 | { 61 | "tilingOffset": { 62 | "__type__": "cc.Vec4", 63 | "x": 35, 64 | "y": 35, 65 | "z": 0, 66 | "w": 0 67 | }, 68 | "occlusion": 1, 69 | "roughness": 0, 70 | "metallic": 0.801, 71 | "specularIntensity": 0.589, 72 | "emissive": { 73 | "__type__": "cc.Color", 74 | "r": 14, 75 | "g": 14, 76 | "b": 14, 77 | "a": 255 78 | }, 79 | "normalStrength": 1.121, 80 | "anisotropyRotation": 0.0256, 81 | "mainTexture": { 82 | "__uuid__": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 83 | "__expectedType__": "cc.Texture2D" 84 | }, 85 | "normalMap": { 86 | "__uuid__": "8b42b8da-a486-4495-8f73-45db33830247@6c48a", 87 | "__expectedType__": "cc.Texture2D" 88 | }, 89 | "pbrMap": { 90 | "__uuid__": "3db6c629-d5bf-4862-b1f8-dd897cb19b8b@6c48a", 91 | "__expectedType__": "cc.Texture2D" 92 | } 93 | }, 94 | {}, 95 | {}, 96 | {} 97 | ] 98 | } -------------------------------------------------------------------------------- /assets/res/mat/robot/Toon.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | {}, 13 | { 14 | "USE_ALBEDO_MAP": true 15 | }, 16 | {}, 17 | {}, 18 | {} 19 | ], 20 | "_states": [ 21 | { 22 | "rasterizerState": {}, 23 | "depthStencilState": {}, 24 | "blendState": { 25 | "targets": [ 26 | {} 27 | ] 28 | } 29 | }, 30 | { 31 | "rasterizerState": {}, 32 | "depthStencilState": {}, 33 | "blendState": { 34 | "targets": [ 35 | {} 36 | ] 37 | } 38 | }, 39 | { 40 | "rasterizerState": {}, 41 | "depthStencilState": {}, 42 | "blendState": { 43 | "targets": [ 44 | {} 45 | ] 46 | } 47 | }, 48 | { 49 | "rasterizerState": {}, 50 | "depthStencilState": {}, 51 | "blendState": { 52 | "targets": [ 53 | {} 54 | ] 55 | } 56 | }, 57 | { 58 | "rasterizerState": {}, 59 | "depthStencilState": {}, 60 | "blendState": { 61 | "targets": [ 62 | {} 63 | ] 64 | } 65 | } 66 | ], 67 | "_props": [ 68 | { 69 | "lineWidth": 18.18, 70 | "baseColor": { 71 | "__type__": "cc.Color", 72 | "r": 222, 73 | "g": 255, 74 | "b": 117, 75 | "a": 255 76 | } 77 | }, 78 | { 79 | "mainTexture": { 80 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 81 | "__expectedType__": "cc.Texture2D" 82 | }, 83 | "mainColor": { 84 | "__type__": "cc.Color", 85 | "r": 255, 86 | "g": 255, 87 | "b": 255, 88 | "a": 255 89 | }, 90 | "shadeStep": 0.622, 91 | "baseStep": 0.403, 92 | "shadeFeather": 0.046, 93 | "shadeStrength": 0.642, 94 | "specularStep": 0.324, 95 | "specularFeather": 0.019, 96 | "specularStrength": 1.98 97 | }, 98 | {}, 99 | {}, 100 | {} 101 | ] 102 | } -------------------------------------------------------------------------------- /assets/easyMenu/src/eToggle.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, director, EventHandler, Label, Node, Sprite, sys, Toggle } from 'cc'; 2 | const { ccclass, property, executeInEditMode } = _decorator; 3 | const tempC_1 = new Color() 4 | 5 | @ccclass('Easy Toggle') 6 | 7 | export class eToggle extends Component { 8 | @property(Sprite) 9 | BgSprite: Sprite = null; 10 | @property(Sprite) 11 | SideSprite: Sprite = null; 12 | @property(Label) 13 | NameLable: Label = null; 14 | @property(Toggle) 15 | toggle:Toggle = null; 16 | @property(Color) 17 | set MenuItemBgColor(v) { 18 | this.BgColor = v; 19 | this.onNormal(); 20 | } 21 | get MenuItemBgColor() { 22 | return this.BgColor; 23 | } 24 | @property(Color) 25 | set MenuItemSideColor(v) { 26 | this.SideColor = v; 27 | this.onNormal(); 28 | } 29 | get MenuItemSideColor() { 30 | return this.SideColor; 31 | } 32 | @property({ visible: false }) 33 | private BgColor: Color = new Color(40, 40, 40, 255); 34 | @property({ visible: false }) 35 | private SideColor: Color = new Color(0, 130, 180, 255); 36 | 37 | private pressStrenth = 0.75; 38 | public callback: (bool:boolean)=>void; 39 | public eventData: any; 40 | 41 | 42 | init(name: string,cb?: (bool:boolean)=>void) { 43 | this.node.name = name; 44 | this.NameLable.string = name; 45 | cb && (this.callback = cb); 46 | } 47 | 48 | onEnable() { 49 | this.onNormal(); 50 | if(sys.platform=sys.Platform.DESKTOP_BROWSER){ 51 | this.node.on(Node.EventType.MOUSE_ENTER, this.onPress, this); 52 | this.node.on(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 53 | } 54 | } 55 | onDisable() { 56 | if(sys.platform=sys.Platform.DESKTOP_BROWSER){ 57 | this.node.off(Node.EventType.MOUSE_ENTER, this.onPress, this); 58 | this.node.off(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 59 | } 60 | } 61 | onToggleCallback(toggle: Toggle){ 62 | this.callback && this.callback(toggle.isChecked); 63 | } 64 | 65 | changeColor(press){ 66 | this.BgSprite.color = tempC_1.set(this.BgColor.r * press, this.BgColor.g * press, this.BgColor.b * press); 67 | } 68 | onPress(){ 69 | this.changeColor(this.pressStrenth); 70 | } 71 | onNormal(){ 72 | this.changeColor(1); 73 | } 74 | 75 | 76 | } 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /assets/scripts/frame/Enums.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: iwae iwae@foxmail.com 3 | * @Date: 2022-09-02 10:22:44 4 | * @LastEditors: chenyang.sun chenyang.sun@cocos.com 5 | * @LastEditTime: 2023-09-05 11:25:55 6 | * @FilePath: /physicPhysic/assets/src/enum/Enums.ts 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE 8 | */ 9 | import { AudioClip, ImageAsset, JsonAsset, Prefab, SpriteAtlas, SpriteFrame, Texture2D, TextureCube } from "cc"; 10 | 11 | 12 | export class playerState { 13 | static isMoving = false; 14 | } 15 | 16 | export enum Control { 17 | joystick, 18 | xr, 19 | key 20 | 21 | } 22 | export const ob = { 23 | Buildings: { name: 'Buildings' }, 24 | Keys: { name: 'Keys' }, 25 | Env: { name: 'Env' }, 26 | Chests: { name: 'Chests' }, 27 | Char: { name: 'Char' }, 28 | xiaomeiV1: { name: 'xiaomeiV1' }, 29 | xiaoshuaiV1: { name: 'xiaoshuaiV1' }, 30 | cargirl: { name: 'cargirl' }, 31 | cy: { name: 'cy' }, 32 | CharAvatar: { name: 'CharAvatar' }, 33 | } 34 | 35 | export const ui = ({ 36 | GameUI: { name: 'GameView', layer: 0 }, 37 | JoystickView: { name: 'JoystickView', layer: 1 }, 38 | FailView: { name: 'FailView', layer: 3 }, 39 | SettingView: { name: 'SettingView', layer: 2 }, 40 | WinView: { name: 'WinView', layer: 3 }, 41 | ToastView: { name: 'ToastView', layer: 5 }, 42 | CJieView: { name: 'CJieView', layer: 3 }, 43 | ShareView: { name: 'ShareView', layer: 4 }, 44 | BigMapView: { name: "BigMapView", layer: 4 }, 45 | CarTouchToastView: { name: "car_touch_toast_view", layer: 5 }, 46 | CarInnerView: { name: "car_inner_view", layer: 5 }, 47 | SelectAvatarView: { name: "SelectAvatarView", layer: 3 }, 48 | DialogView: { name: "DialogView", layer: 5 } 49 | }) 50 | 51 | 52 | export const Props = { 53 | Scenes: "Scenes", 54 | Layers: "Layers", 55 | Comps: "Components", 56 | Setting: "Setting", 57 | } 58 | 59 | /** 60 | */ 61 | export const AssetType = ({ 62 | Prefab: { type: Prefab, path: "preload/Prefabs/" }, 63 | Json: { type: JsonAsset, path: "preload/Jsons/" }, 64 | Sound: { type: AudioClip, path: "preload/Sounds/" }, 65 | Image: { type: SpriteFrame, path: "preload/Images/" }, 66 | Atlas: { type: SpriteAtlas, path: "preload/Atlas/" }, 67 | Skybox: { type: TextureCube, path: "preload/Skybox/" } 68 | 69 | }) 70 | 71 | //相机状态 72 | export enum CameraState { 73 | DEFAULT = 0,//默认 74 | CAR_ORBIT,//轨道相机 75 | CAR_INNER,//车内触摸相机 76 | INTERACT,//进入交互圈之后进入固定视角 77 | } 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /assets/res/mat/robot/ToonOutline.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_OUTLINE_PASS": true 14 | }, 15 | { 16 | "USE_RIM_LIGHT": true, 17 | "USE_ALBEDO_MAP": true 18 | }, 19 | {}, 20 | {}, 21 | {} 22 | ], 23 | "_states": [ 24 | { 25 | "rasterizerState": {}, 26 | "depthStencilState": {}, 27 | "blendState": { 28 | "targets": [ 29 | {} 30 | ] 31 | } 32 | }, 33 | { 34 | "rasterizerState": {}, 35 | "depthStencilState": {}, 36 | "blendState": { 37 | "targets": [ 38 | {} 39 | ] 40 | } 41 | }, 42 | { 43 | "rasterizerState": {}, 44 | "depthStencilState": {}, 45 | "blendState": { 46 | "targets": [ 47 | {} 48 | ] 49 | } 50 | }, 51 | { 52 | "rasterizerState": {}, 53 | "depthStencilState": {}, 54 | "blendState": { 55 | "targets": [ 56 | {} 57 | ] 58 | } 59 | }, 60 | { 61 | "rasterizerState": {}, 62 | "depthStencilState": {}, 63 | "blendState": { 64 | "targets": [ 65 | {} 66 | ] 67 | } 68 | } 69 | ], 70 | "_props": [ 71 | { 72 | "lineWidth": 30, 73 | "depthBias": 0.1, 74 | "baseColor": { 75 | "__type__": "cc.Color", 76 | "r": 227, 77 | "g": 255, 78 | "b": 116, 79 | "a": 255 80 | } 81 | }, 82 | { 83 | "mainTexture": { 84 | "__uuid__": "f6991aef-7f02-4d23-b5f1-48040b943c9a@6c48a", 85 | "__expectedType__": "cc.Texture2D" 86 | }, 87 | "mainColor": { 88 | "__type__": "cc.Color", 89 | "r": 255, 90 | "g": 255, 91 | "b": 255, 92 | "a": 255 93 | }, 94 | "shadeStep": 0.622, 95 | "baseStep": 0.403, 96 | "shadeFeather": 0.046, 97 | "shadeStrength": 0.642, 98 | "specularStep": 0.324, 99 | "specularFeather": 0.006, 100 | "specularStrength": 6.48, 101 | "rimLightColor": { 102 | "__type__": "cc.Color", 103 | "r": 152, 104 | "g": 158, 105 | "b": 131, 106 | "a": 100 107 | } 108 | }, 109 | {}, 110 | {}, 111 | {} 112 | ] 113 | } -------------------------------------------------------------------------------- /assets/easyMenu/src/eItem.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, Label, Node, Sprite, sys } from 'cc'; 2 | const { ccclass, property, executeInEditMode } = _decorator; 3 | const tempC_1 = new Color() 4 | 5 | @ccclass('Easy Item') 6 | 7 | export class eItem extends Component { 8 | @property(Sprite) 9 | BgSprite: Sprite = null; 10 | @property(Sprite) 11 | SideSprite: Sprite = null; 12 | @property(Label) 13 | NameLable: Label = null; 14 | @property(Color) 15 | set MenuItemBgColor(v) { 16 | this.BgColor = v; 17 | this.onNormal(); 18 | } 19 | get MenuItemBgColor() { 20 | return this.BgColor; 21 | } 22 | @property(Color) 23 | set MenuItemSideColor(v) { 24 | this.SideColor = v; 25 | this.onNormal(); 26 | } 27 | get MenuItemSideColor() { 28 | return this.SideColor; 29 | } 30 | @property({ visible: false }) 31 | private BgColor: Color = new Color(40, 40, 40, 255); 32 | @property({ visible: false }) 33 | private SideColor: Color = new Color(0, 130, 180, 255); 34 | 35 | private pressStrenth = 0.75; 36 | public callback: () => string | void | number; 37 | public eventData: any; 38 | 39 | 40 | init(name: string, cb?: () => string | void | number) { 41 | this.node.name = name; 42 | this.NameLable.string = name; 43 | cb && (this.callback = cb); 44 | } 45 | 46 | onEnable() { 47 | this.onNormal(); 48 | this.node.on(Node.EventType.TOUCH_END, this.onClick, this); 49 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 50 | this.node.on(Node.EventType.MOUSE_ENTER, this.onPress, this); 51 | this.node.on(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 52 | } 53 | } 54 | onDisable() { 55 | this.node.off(Node.EventType.TOUCH_END, this.onClick, this); 56 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 57 | this.node.off(Node.EventType.MOUSE_ENTER, this.onPress, this); 58 | this.node.off(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 59 | } 60 | } 61 | 62 | 63 | changeColor(press) { 64 | this.BgSprite.color = tempC_1.set(this.BgColor.r * press, this.BgColor.g * press, this.BgColor.b * press); 65 | } 66 | onPress() { 67 | this.changeColor(this.pressStrenth); 68 | } 69 | onNormal() { 70 | this.changeColor(1); 71 | } 72 | onClick() { 73 | if (!this.callback) return; 74 | const result = this.callback(); 75 | if (result) { 76 | this.NameLable.string = String(result) || this.NameLable.string; 77 | } 78 | } 79 | 80 | } 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /assets/res/mat/ball/toon.mtl: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.Material", 3 | "_name": "", 4 | "_objFlags": 0, 5 | "_native": "", 6 | "_effectAsset": { 7 | "__uuid__": "1548e45b-4156-4e88-aa36-e2c27ca0789d", 8 | "__expectedType__": "cc.EffectAsset" 9 | }, 10 | "_techIdx": 0, 11 | "_defines": [ 12 | { 13 | "USE_OUTLINE_PASS": true 14 | }, 15 | { 16 | "USE_NORMAL_MAP": true, 17 | "USE_RIM_LIGHT": true, 18 | "USE_ALBEDO_MAP": true 19 | }, 20 | {}, 21 | {}, 22 | {} 23 | ], 24 | "_states": [ 25 | { 26 | "rasterizerState": {}, 27 | "depthStencilState": {}, 28 | "blendState": { 29 | "targets": [ 30 | {} 31 | ] 32 | } 33 | }, 34 | { 35 | "rasterizerState": {}, 36 | "depthStencilState": {}, 37 | "blendState": { 38 | "targets": [ 39 | {} 40 | ] 41 | } 42 | }, 43 | { 44 | "rasterizerState": {}, 45 | "depthStencilState": {}, 46 | "blendState": { 47 | "targets": [ 48 | {} 49 | ] 50 | } 51 | }, 52 | { 53 | "rasterizerState": {}, 54 | "depthStencilState": {}, 55 | "blendState": { 56 | "targets": [ 57 | {} 58 | ] 59 | } 60 | }, 61 | { 62 | "rasterizerState": {}, 63 | "depthStencilState": {}, 64 | "blendState": { 65 | "targets": [ 66 | {} 67 | ] 68 | } 69 | } 70 | ], 71 | "_props": [ 72 | { 73 | "lineWidth": 35.1, 74 | "baseColor": { 75 | "__type__": "cc.Color", 76 | "r": 185, 77 | "g": 195, 78 | "b": 255, 79 | "a": 255 80 | } 81 | }, 82 | { 83 | "mainTexture": { 84 | "__uuid__": "72f3b448-90e1-4cd4-b1f1-2fb75922aa74@6c48a", 85 | "__expectedType__": "cc.Texture2D" 86 | }, 87 | "mainColor": { 88 | "__type__": "cc.Color", 89 | "r": 255, 90 | "g": 255, 91 | "b": 255, 92 | "a": 255 93 | }, 94 | "shadeStep": 0.642, 95 | "baseStep": 0.47, 96 | "shadeFeather": 0.032, 97 | "shadeStrength": 0.648, 98 | "normalMap": { 99 | "__uuid__": "f0f6ff34-bd30-4d43-a22c-d675857c244e@6c48a", 100 | "__expectedType__": "cc.Texture2D" 101 | }, 102 | "normalStrength": 2, 103 | "specularStep": 0.39, 104 | "specularFeather": 0.079, 105 | "specularStrength": 7.14, 106 | "rimLightColor": { 107 | "__type__": "cc.Color", 108 | "r": 211, 109 | "g": 184, 110 | "b": 184, 111 | "a": 40 112 | } 113 | }, 114 | {}, 115 | {}, 116 | {} 117 | ] 118 | } -------------------------------------------------------------------------------- /assets/easyMenu/src/eList.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, director, EventHandler, Label, Node, Sprite, sys } from 'cc'; 2 | const { ccclass, property, executeInEditMode } = _decorator; 3 | const tempC_1 = new Color() 4 | 5 | @ccclass('Easy List') 6 | export class eList extends Component { 7 | @property(Node) 8 | TouchArea:Node = null; 9 | @property(Sprite) 10 | BgSprite: Sprite = null; 11 | @property(Sprite) 12 | SideSprite: Sprite = null; 13 | @property(Label) 14 | NameLable: Label = null; 15 | @property(Label) 16 | ListLabel: Label = null; 17 | @property(Color) 18 | set MenuItemBgColor(v) { 19 | this.BgColor = v; 20 | this.onNormal(); 21 | } 22 | get MenuItemBgColor() { 23 | return this.BgColor; 24 | } 25 | @property(Color) 26 | set MenuItemSideColor(v) { 27 | this.SideColor = v; 28 | this.onNormal(); 29 | } 30 | get MenuItemSideColor() { 31 | return this.SideColor; 32 | } 33 | @property({ visible: false }) 34 | private BgColor: Color = new Color(40, 40, 40, 255); 35 | @property({ visible: false }) 36 | private SideColor: Color = new Color(0, 130, 180, 255); 37 | 38 | private pressStrenth = 0.75; 39 | public callback: () => string | void | number; 40 | public eventData: any; 41 | 42 | 43 | init(name: string, cb?: () => string | void | number) { 44 | this.node.name = name; 45 | this.NameLable.string = name; 46 | cb && (this.callback = cb); 47 | } 48 | 49 | onEnable() { 50 | this.onNormal(); 51 | this.TouchArea.on(Node.EventType.TOUCH_END, this.onClick, this); 52 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 53 | this.node.on(Node.EventType.MOUSE_ENTER, this.onPress, this); 54 | this.node.on(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 55 | } 56 | } 57 | onDisable() { 58 | this.TouchArea.off(Node.EventType.TOUCH_END, this.onClick, this); 59 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 60 | this.node.off(Node.EventType.MOUSE_ENTER, this.onPress, this); 61 | this.node.off(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 62 | } 63 | } 64 | 65 | 66 | changeColor(press) { 67 | this.BgSprite.color = tempC_1.set(this.BgColor.r * press, this.BgColor.g * press, this.BgColor.b * press); 68 | } 69 | onPress() { 70 | this.changeColor(this.pressStrenth); 71 | } 72 | onNormal() { 73 | this.changeColor(1); 74 | } 75 | onClick() { 76 | if (!this.callback) return; 77 | const result = this.callback(); 78 | if (result) { 79 | this.ListLabel.string = String(result) || this.ListLabel.string; 80 | } 81 | } 82 | 83 | } 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eEdit.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, clamp, Color, Component, EditBox, Label, Node, Slider, Sprite, sys } from 'cc'; 2 | const { ccclass, property, executeInEditMode } = _decorator; 3 | const tempC_1 = new Color() 4 | 5 | @ccclass('Easy Edit') 6 | 7 | export class eEdit extends Component { 8 | @property(Sprite) 9 | BgSprite: Sprite = null; 10 | @property(Sprite) 11 | SideSprite: Sprite = null; 12 | @property(Label) 13 | NameLable: Label = null; 14 | 15 | @property(EditBox) 16 | editbox: EditBox = null; 17 | @property(Color) 18 | set MenuItemBgColor(v) { 19 | this.BgColor = v; 20 | this.onNormal(); 21 | } 22 | get MenuItemBgColor() { 23 | return this.BgColor; 24 | } 25 | @property(Color) 26 | set MenuItemSideColor(v) { 27 | this.SideColor = v; 28 | this.onNormal(); 29 | } 30 | get MenuItemSideColor() { 31 | return this.SideColor; 32 | } 33 | @property({ visible: false }) 34 | private BgColor: Color = new Color(40, 40, 40, 255); 35 | @property({ visible: false }) 36 | private SideColor: Color = new Color(0, 130, 180, 255); 37 | 38 | private pressStrenth = 0.75; 39 | public callback: (input:string)=>void; 40 | public eventData: any; 41 | 42 | 43 | init(name: string, editstring:any, cb?: (input:string)=>void) { 44 | this.node.name = name; 45 | this.NameLable.string = name; 46 | this.editbox.string = editstring; 47 | cb && (this.callback = cb); 48 | } 49 | 50 | onEnable() { 51 | this.onNormal(); 52 | // this.node.on(Node.EventType.TOUCH_END, this.onClick, this); 53 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 54 | this.node.on(Node.EventType.MOUSE_ENTER, this.onPress, this); 55 | this.node.on(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 56 | } 57 | } 58 | onDisable() { 59 | // this.node.off(Node.EventType.TOUCH_END, this.onClick, this); 60 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 61 | this.node.off(Node.EventType.MOUSE_ENTER, this.onPress, this); 62 | this.node.off(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 63 | } 64 | } 65 | 66 | setProgress(v: number) { 67 | let value = clamp(Number(v) || 0, 0, 1); 68 | this.editbox.string = "" + value; 69 | } 70 | 71 | 72 | onEditDidEnded(editbox: EditBox, customEventData) { 73 | const value = editbox.string; 74 | this.callback&&this.callback(value); 75 | } 76 | 77 | changeColor(press) { 78 | this.BgSprite.color = tempC_1.set(this.BgColor.r * press, this.BgColor.g * press, this.BgColor.b * press); 79 | } 80 | onPress() { 81 | this.changeColor(this.pressStrenth); 82 | } 83 | onNormal() { 84 | this.changeColor(1); 85 | } 86 | 87 | 88 | } 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # easyMenu 2 | easyMenu is a component to help developers to add menus easily in Cocos Creator 3 | 4 | ![image](https://github.com/iwae/easyMenu/assets/26038745/80b44753-5222-4223-840e-d7141c8fccaa) 5 | 6 | it presets few functions for 2d/3d game tests. 7 | 8 | ### FPS Monitor 9 | ![122](https://github.com/iwae/easyMenu/assets/26038745/d39d5829-45d1-45ad-9e7d-effec50bf63b) 10 | 11 | ### Time Scale 12 | ![133](https://github.com/iwae/easyMenu/assets/26038745/6c84889d-7c37-49df-b4f4-db167e9d0b88) 13 | 14 | ### Overdraw Debug 15 | 16 | ![image](https://github.com/iwae/easyMenu/assets/26038745/446e4c69-2c30-4522-8ce2-d35afe37da3c) 17 | 18 | ## how to use 19 | copy easyMenu to your project, and add EasyMenu to the Canvas 20 | 21 | ![image](https://github.com/iwae/easyMenu/assets/26038745/f65c65b1-df16-4014-b64f-3ad579a60041) 22 | 23 | 24 | ## add group 25 | 26 | ![image](https://github.com/iwae/easyMenu/assets/26038745/05c1f225-6d05-47fc-8378-5d46054fb140) 27 | 28 | ``` typescript 29 | const menu = director.getScene().getChildByName('Canvas').getComponentInChildren(eMenu); 30 | if(!menu) return; 31 | const group = menu.addGroup("Scene"); 32 | 33 | ``` 34 | 35 | ## add item 36 | ``` typescript 37 | group.addItem("Default",()=>{ 38 | this.defaultScene(); 39 | }); 40 | ``` 41 | 42 | ## add toggle 43 | ``` typescript 44 | 45 | group.addToggle("High FPS", (t) => { 46 | game.frameRate = t ? 60 : 30; 47 | }); 48 | ``` 49 | 50 | ## add list 51 | ``` typescript 52 | 53 | group.addList("Image Memory", 54 | this.getImageMemory.bind(this) 55 | ); 56 | ``` 57 | ## add slider 58 | ``` typescript 59 | 60 | group.addSlider("Scale", (v: number) => { 61 | timeScale.scale = v; 62 | }, 1); 63 | ``` 64 | ## add editbox 65 | ``` typescript 66 | group.addEdit("edit", "default",((input:string)=>{ 67 | 68 | }); 69 | ``` 70 | ## add graph 71 | ``` typescript 72 | group.addGraph("FPS", null, 60, 14); 73 | 74 | this.graph = group.node.getChildByName("FPS").getComponent(eGraph); 75 | 76 | this.graph.callback = (() => { 77 | const output = this.graph.positions.toString(); 78 | console.log("FPS History", output) 79 | this.copyToClipboard(output); 80 | }) 81 | ``` 82 | ## add multi items 83 | ``` typescript 84 | this.menu 85 | .addGroup("Debug") 86 | .addToggle("Profiler", (t) => { 87 | t ? profiler.showStats() : profiler.hideStats(); 88 | }) 89 | .addSlider("Scale", (v: number) => { 90 | TimeScale.scale = v; 91 | }, 1) 92 | .addItem("Game Time", () => { 93 | return "GameTime: " + Math.floor(game.totalTime) + " ms"; 94 | }) 95 | .addToggle("High FPS", (t) => { 96 | game.frameRate = t ? 60 : 30; 97 | }) 98 | .addItem("Overdraw Test", 99 | this.testOverdraw.bind(this) 100 | ) 101 | .addList("Image Memory", 102 | this.getImageMemory.bind(this) 103 | ) 104 | ``` 105 | -------------------------------------------------------------------------------- /assets/bundles/bundle1/preload/Prefabs/Plane.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "Plane", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "persistent": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "Plane", 16 | "_objFlags": 0, 17 | "__editorExtras__": {}, 18 | "_parent": null, 19 | "_children": [], 20 | "_active": true, 21 | "_components": [ 22 | { 23 | "__id__": 2 24 | } 25 | ], 26 | "_prefab": { 27 | "__id__": 5 28 | }, 29 | "_lpos": { 30 | "__type__": "cc.Vec3", 31 | "x": 0, 32 | "y": 0, 33 | "z": 0 34 | }, 35 | "_lrot": { 36 | "__type__": "cc.Quat", 37 | "x": 0, 38 | "y": 0, 39 | "z": 0, 40 | "w": 1 41 | }, 42 | "_lscale": { 43 | "__type__": "cc.Vec3", 44 | "x": 14, 45 | "y": 1, 46 | "z": 14 47 | }, 48 | "_mobility": 0, 49 | "_layer": 1073741824, 50 | "_euler": { 51 | "__type__": "cc.Vec3", 52 | "x": 0, 53 | "y": 0, 54 | "z": 0 55 | }, 56 | "_id": "" 57 | }, 58 | { 59 | "__type__": "cc.MeshRenderer", 60 | "_name": "Plane", 61 | "_objFlags": 0, 62 | "node": { 63 | "__id__": 1 64 | }, 65 | "_enabled": true, 66 | "__prefab": { 67 | "__id__": 3 68 | }, 69 | "_materials": [ 70 | { 71 | "__uuid__": "d4412da5-69a5-43d4-ad62-b85bb66b53af", 72 | "__expectedType__": "cc.Material" 73 | } 74 | ], 75 | "_visFlags": 0, 76 | "bakeSettings": { 77 | "__id__": 4 78 | }, 79 | "_mesh": { 80 | "__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@2e76e", 81 | "__expectedType__": "cc.Mesh" 82 | }, 83 | "_shadowCastingMode": 0, 84 | "_shadowReceivingMode": 1, 85 | "_shadowBias": 0, 86 | "_shadowNormalBias": 0, 87 | "_reflectionProbeId": -1, 88 | "_enableMorph": true, 89 | "_id": "" 90 | }, 91 | { 92 | "__type__": "cc.CompPrefabInfo", 93 | "fileId": "38eV5/gt1H7JO9T3r4XKws" 94 | }, 95 | { 96 | "__type__": "cc.ModelBakeSettings", 97 | "texture": null, 98 | "uvParam": { 99 | "__type__": "cc.Vec4", 100 | "x": 0, 101 | "y": 0, 102 | "z": 0, 103 | "w": 0 104 | }, 105 | "_bakeable": false, 106 | "_castShadow": false, 107 | "_receiveShadow": false, 108 | "_recieveShadow": false, 109 | "_lightmapSize": 64, 110 | "_useLightProbe": false, 111 | "_bakeToLightProbe": true, 112 | "_reflectionProbeType": 0, 113 | "_bakeToReflectionProbe": true, 114 | "_probeCubemap": null 115 | }, 116 | { 117 | "__type__": "cc.PrefabInfo", 118 | "root": { 119 | "__id__": 1 120 | }, 121 | "asset": { 122 | "__id__": 0 123 | }, 124 | "fileId": "35qJnUk/5FvY1Mv5Z2fnAe", 125 | "targetOverrides": null 126 | } 127 | ] -------------------------------------------------------------------------------- /assets/easyMenu/src/eSlider.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, clamp, Color, Component, director, EditBox, Label, Node, Slider, Sprite, sys } from 'cc'; 2 | const { ccclass, property } = _decorator; 3 | const tempC_1 = new Color() 4 | 5 | @ccclass('Easy Slider') 6 | 7 | export class eSlider extends Component { 8 | @property(Sprite) 9 | BgSprite: Sprite = null; 10 | @property(Sprite) 11 | SideSprite: Sprite = null; 12 | @property(Label) 13 | NameLable: Label = null; 14 | @property(Slider) 15 | slider: Slider = null; 16 | @property(EditBox) 17 | editbox: EditBox = null; 18 | @property(Color) 19 | set MenuItemBgColor(v) { 20 | this.BgColor = v; 21 | this.onNormal(); 22 | } 23 | get MenuItemBgColor() { 24 | return this.BgColor; 25 | } 26 | @property(Color) 27 | set MenuItemSideColor(v) { 28 | this.SideColor = v; 29 | this.onNormal(); 30 | } 31 | get MenuItemSideColor() { 32 | return this.SideColor; 33 | } 34 | @property({ visible: false }) 35 | private BgColor: Color = new Color(40, 40, 40, 255); 36 | @property({ visible: false }) 37 | private SideColor: Color = new Color(0, 130, 180, 255); 38 | 39 | private pressStrenth = 0.75; 40 | public callback: (progress:number)=>void; 41 | public eventData: any; 42 | private _scale = 1; 43 | 44 | 45 | init(name: string, cb?: (progress:number)=>void, scale?:number) { 46 | this.node.name = name; 47 | this.NameLable.string = name; 48 | cb && (this.callback = cb); 49 | scale && (this._scale = scale); 50 | } 51 | 52 | onEnable() { 53 | this.onNormal(); 54 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 55 | this.node.on(Node.EventType.MOUSE_ENTER, this.onPress, this); 56 | this.node.on(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 57 | } 58 | } 59 | onDisable() { 60 | if (sys.platform = sys.Platform.DESKTOP_BROWSER) { 61 | this.node.off(Node.EventType.MOUSE_ENTER, this.onPress, this); 62 | this.node.off(Node.EventType.MOUSE_LEAVE, this.onNormal, this); 63 | } 64 | } 65 | 66 | setProgress(v: number) { 67 | let value = clamp(Number(v) || 0, 0, this._scale); 68 | this.slider.progress = value/this._scale; 69 | this.editbox.string = "" + value; 70 | } 71 | 72 | onSliderCallback(slider: Slider, customEventData: string) { 73 | const progress = slider.progress * this._scale; 74 | this.editbox.string = "" +progress; 75 | this.callback&&this.callback(progress); 76 | } 77 | 78 | onEditDidEnded(editbox: EditBox, customEventData) { 79 | const value = clamp(Number(editbox.string) || 0, 0, this._scale); 80 | this.callback&&this.callback(value); 81 | this.slider.progress = value/this._scale; 82 | } 83 | 84 | changeColor(press) { 85 | this.BgSprite.color = tempC_1.set(this.BgColor.r * press, this.BgColor.g * press, this.BgColor.b * press); 86 | } 87 | onPress() { 88 | this.changeColor(this.pressStrenth); 89 | } 90 | onNormal() { 91 | this.changeColor(1); 92 | } 93 | onClick() { 94 | if (!this.callback) return; 95 | this.callback(this.slider.progress); 96 | } 97 | 98 | } 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /settings/v2/packages/engine.json: -------------------------------------------------------------------------------- 1 | { 2 | "__version__": "1.0.7", 3 | "modules": { 4 | "cache": { 5 | "base": { 6 | "_value": true 7 | }, 8 | "graphcis": { 9 | "_value": true 10 | }, 11 | "gfx-webgl": { 12 | "_value": true 13 | }, 14 | "gfx-webgl2": { 15 | "_value": true 16 | }, 17 | "animation": { 18 | "_value": true 19 | }, 20 | "skeletal-animation": { 21 | "_value": true 22 | }, 23 | "3d": { 24 | "_value": true 25 | }, 26 | "2d": { 27 | "_value": true 28 | }, 29 | "xr": { 30 | "_value": false 31 | }, 32 | "ui": { 33 | "_value": true 34 | }, 35 | "particle": { 36 | "_value": false 37 | }, 38 | "physics": { 39 | "_value": false, 40 | "_option": "physics-ammo" 41 | }, 42 | "physics-ammo": { 43 | "_value": false 44 | }, 45 | "physics-cannon": { 46 | "_value": false 47 | }, 48 | "physics-physx": { 49 | "_value": false 50 | }, 51 | "physics-builtin": { 52 | "_value": false 53 | }, 54 | "physics-2d": { 55 | "_value": false, 56 | "_option": "physics-2d-box2d" 57 | }, 58 | "physics-2d-box2d": { 59 | "_value": false 60 | }, 61 | "physics-2d-builtin": { 62 | "_value": false 63 | }, 64 | "intersection-2d": { 65 | "_value": false 66 | }, 67 | "primitive": { 68 | "_value": true 69 | }, 70 | "profiler": { 71 | "_value": true 72 | }, 73 | "occlusion-query": { 74 | "_value": false 75 | }, 76 | "geometry-renderer": { 77 | "_value": false 78 | }, 79 | "debug-renderer": { 80 | "_value": false 81 | }, 82 | "particle-2d": { 83 | "_value": false 84 | }, 85 | "audio": { 86 | "_value": true 87 | }, 88 | "video": { 89 | "_value": false 90 | }, 91 | "webview": { 92 | "_value": false 93 | }, 94 | "tween": { 95 | "_value": false 96 | }, 97 | "websocket": { 98 | "_value": true 99 | }, 100 | "websocket-server": { 101 | "_value": false 102 | }, 103 | "terrain": { 104 | "_value": false 105 | }, 106 | "light-probe": { 107 | "_value": false 108 | }, 109 | "tiled-map": { 110 | "_value": false 111 | }, 112 | "spine": { 113 | "_value": false 114 | }, 115 | "dragon-bones": { 116 | "_value": false 117 | }, 118 | "marionette": { 119 | "_value": false 120 | }, 121 | "custom-pipeline": { 122 | "_value": false 123 | } 124 | }, 125 | "flags": {}, 126 | "includeModules": [ 127 | "2d", 128 | "3d", 129 | "animation", 130 | "audio", 131 | "base", 132 | "gfx-webgl", 133 | "gfx-webgl2", 134 | "primitive", 135 | "profiler", 136 | "skeletal-animation", 137 | "ui", 138 | "websocket" 139 | ], 140 | "noDeprecatedFeatures": { 141 | "value": false, 142 | "version": "" 143 | } 144 | }, 145 | "macroConfig": { 146 | "BATCHER2D_MEM_INCREMENT": 512 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /assets/res/textures/miaomiao.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "eda8cf95-aca7-44a6-ae2f-c3f1c0440b05", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "eda8cf95-aca7-44a6-ae2f-c3f1c0440b05@6c48a", 14 | "displayName": "miaomiao", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "eda8cf95-aca7-44a6-ae2f-c3f1c0440b05", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "eda8cf95-aca7-44a6-ae2f-c3f1c0440b05@f9941", 38 | "displayName": "miaomiao", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 0, 48 | "trimY": 0, 49 | "width": 101, 50 | "height": 115, 51 | "rawWidth": 101, 52 | "rawHeight": 115, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -50.5, 65 | -57.5, 66 | 0, 67 | 50.5, 68 | -57.5, 69 | 0, 70 | -50.5, 71 | 57.5, 72 | 0, 73 | 50.5, 74 | 57.5, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 0, 87 | 115, 88 | 101, 89 | 115, 90 | 0, 91 | 0, 92 | 101, 93 | 0 94 | ], 95 | "nuv": [ 96 | 0, 97 | 0, 98 | 1, 99 | 0, 100 | 0, 101 | 1, 102 | 1, 103 | 1 104 | ], 105 | "minPos": [ 106 | -50.5, 107 | -57.5, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 50.5, 112 | 57.5, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "eda8cf95-aca7-44a6-ae2f-c3f1c0440b05@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.11", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "fixAlphaTransparencyArtifacts": true, 130 | "hasAlpha": true, 131 | "type": "sprite-frame", 132 | "redirect": "eda8cf95-aca7-44a6-ae2f-c3f1c0440b05@f9941" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/bundles/bundle2/preload/Prefabs/Models.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "Models", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "persistent": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "Models", 16 | "_objFlags": 0, 17 | "__editorExtras__": {}, 18 | "_parent": null, 19 | "_children": [], 20 | "_active": true, 21 | "_components": [ 22 | { 23 | "__id__": 2 24 | }, 25 | { 26 | "__id__": 4 27 | } 28 | ], 29 | "_prefab": { 30 | "__id__": 6 31 | }, 32 | "_lpos": { 33 | "__type__": "cc.Vec3", 34 | "x": 0, 35 | "y": 0, 36 | "z": 0 37 | }, 38 | "_lrot": { 39 | "__type__": "cc.Quat", 40 | "x": 0, 41 | "y": 0, 42 | "z": 0, 43 | "w": 1 44 | }, 45 | "_lscale": { 46 | "__type__": "cc.Vec3", 47 | "x": 1, 48 | "y": 1, 49 | "z": 1 50 | }, 51 | "_mobility": 0, 52 | "_layer": 1073741824, 53 | "_euler": { 54 | "__type__": "cc.Vec3", 55 | "x": 0, 56 | "y": 0, 57 | "z": 0 58 | }, 59 | "_id": "" 60 | }, 61 | { 62 | "__type__": "e71e6BBWURA44A9xJ3f44ub", 63 | "_name": "", 64 | "_objFlags": 0, 65 | "node": { 66 | "__id__": 1 67 | }, 68 | "_enabled": true, 69 | "__prefab": { 70 | "__id__": 3 71 | }, 72 | "default": { 73 | "__uuid__": "56172057-5403-41cd-8526-921a8b49ff52", 74 | "__expectedType__": "cc.Prefab" 75 | }, 76 | "cases": [ 77 | { 78 | "__uuid__": "c974daa1-812c-40d3-bbb1-c65328082b95", 79 | "__expectedType__": "cc.Prefab" 80 | }, 81 | { 82 | "__uuid__": "2bf0d501-6245-4dc4-9eb2-42e1535e9112", 83 | "__expectedType__": "cc.Prefab" 84 | }, 85 | { 86 | "__uuid__": "da73c735-2798-449b-9cb3-1411a4b4a33f", 87 | "__expectedType__": "cc.Prefab" 88 | }, 89 | { 90 | "__uuid__": "16289bab-2c64-4055-af8f-423b03fc4457", 91 | "__expectedType__": "cc.Prefab" 92 | }, 93 | { 94 | "__uuid__": "31514b02-a618-4ee4-acfa-a2b5b215730a", 95 | "__expectedType__": "cc.Prefab" 96 | }, 97 | { 98 | "__uuid__": "6a241440-d903-4869-a21e-867939eb6aed", 99 | "__expectedType__": "cc.Prefab" 100 | }, 101 | { 102 | "__uuid__": "db416a7a-ef50-4c24-b749-1780b81ee556", 103 | "__expectedType__": "cc.Prefab" 104 | }, 105 | { 106 | "__uuid__": "57c9dcbb-cdf5-4d38-94ab-1a2371c1c1c0", 107 | "__expectedType__": "cc.Prefab" 108 | } 109 | ], 110 | "_id": "" 111 | }, 112 | { 113 | "__type__": "cc.CompPrefabInfo", 114 | "fileId": "2ewJDbXAJLG7r5WpHKJpX9" 115 | }, 116 | { 117 | "__type__": "5cad5S7g31GLZJ6V5nmVIVQ", 118 | "_name": "", 119 | "_objFlags": 0, 120 | "node": { 121 | "__id__": 1 122 | }, 123 | "_enabled": true, 124 | "__prefab": { 125 | "__id__": 5 126 | }, 127 | "_id": "" 128 | }, 129 | { 130 | "__type__": "cc.CompPrefabInfo", 131 | "fileId": "a7bFEHVCRJx656cEAi1RpX" 132 | }, 133 | { 134 | "__type__": "cc.PrefabInfo", 135 | "root": { 136 | "__id__": 1 137 | }, 138 | "asset": { 139 | "__id__": 0 140 | }, 141 | "fileId": "f6FSK7D8VIjZ6tnwWT/sdX", 142 | "instance": null, 143 | "targetOverrides": null 144 | } 145 | ] -------------------------------------------------------------------------------- /assets/easyMenu/sprites/bmfont.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "6844f69d-0d8f-4950-afc8-aba514477da6", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "6844f69d-0d8f-4950-afc8-aba514477da6@6c48a", 14 | "displayName": "bmfont", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "6844f69d-0d8f-4950-afc8-aba514477da6", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "6844f69d-0d8f-4950-afc8-aba514477da6@f9941", 38 | "displayName": "bmfont", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 1, 48 | "trimY": 1, 49 | "width": 167, 50 | "height": 164, 51 | "rawWidth": 169, 52 | "rawHeight": 166, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -83.5, 65 | -82, 66 | 0, 67 | 83.5, 68 | -82, 69 | 0, 70 | -83.5, 71 | 82, 72 | 0, 73 | 83.5, 74 | 82, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 1, 87 | 165, 88 | 168, 89 | 165, 90 | 1, 91 | 1, 92 | 168, 93 | 1 94 | ], 95 | "nuv": [ 96 | 0.005917159763313609, 97 | 0.006024096385542169, 98 | 0.9940828402366864, 99 | 0.006024096385542169, 100 | 0.005917159763313609, 101 | 0.9939759036144579, 102 | 0.9940828402366864, 103 | 0.9939759036144579 104 | ], 105 | "minPos": [ 106 | -83.5, 107 | -82, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 83.5, 112 | 82, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "6844f69d-0d8f-4950-afc8-aba514477da6@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.11", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "fixAlphaTransparencyArtifacts": true, 130 | "hasAlpha": true, 131 | "type": "sprite-frame", 132 | "redirect": "6844f69d-0d8f-4950-afc8-aba514477da6@f9941" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/res/textures/iwaecat_cat_girl_toon__cel_shading_beautiful_1240b7e5-6b4f-42bb-8f6d-403abf1f7633.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "aa761280-1e10-4e3a-bfba-09f6b716f5af", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "importer": "texture", 13 | "uuid": "aa761280-1e10-4e3a-bfba-09f6b716f5af@6c48a", 14 | "displayName": "iwaecat_cat_girl_toon__cel_shading_beautiful_1240b7e5-6b4f-42bb-8f6d-403abf1f7633", 15 | "id": "6c48a", 16 | "name": "texture", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "none", 23 | "anisotropy": 0, 24 | "isUuid": true, 25 | "imageUuidOrDatabaseUri": "aa761280-1e10-4e3a-bfba-09f6b716f5af", 26 | "visible": false 27 | }, 28 | "ver": "1.0.22", 29 | "imported": true, 30 | "files": [ 31 | ".json" 32 | ], 33 | "subMetas": {} 34 | }, 35 | "f9941": { 36 | "importer": "sprite-frame", 37 | "uuid": "aa761280-1e10-4e3a-bfba-09f6b716f5af@f9941", 38 | "displayName": "iwaecat_cat_girl_toon__cel_shading_beautiful_1240b7e5-6b4f-42bb-8f6d-403abf1f7633", 39 | "id": "f9941", 40 | "name": "spriteFrame", 41 | "userData": { 42 | "trimType": "auto", 43 | "trimThreshold": 1, 44 | "rotated": false, 45 | "offsetX": 0, 46 | "offsetY": 0, 47 | "trimX": 0, 48 | "trimY": 0, 49 | "width": 600, 50 | "height": 124, 51 | "rawWidth": 600, 52 | "rawHeight": 124, 53 | "borderTop": 0, 54 | "borderBottom": 0, 55 | "borderLeft": 0, 56 | "borderRight": 0, 57 | "packable": true, 58 | "pixelsToUnit": 100, 59 | "pivotX": 0.5, 60 | "pivotY": 0.5, 61 | "meshType": 0, 62 | "vertices": { 63 | "rawPosition": [ 64 | -300, 65 | -62, 66 | 0, 67 | 300, 68 | -62, 69 | 0, 70 | -300, 71 | 62, 72 | 0, 73 | 300, 74 | 62, 75 | 0 76 | ], 77 | "indexes": [ 78 | 0, 79 | 1, 80 | 2, 81 | 2, 82 | 1, 83 | 3 84 | ], 85 | "uv": [ 86 | 0, 87 | 124, 88 | 600, 89 | 124, 90 | 0, 91 | 0, 92 | 600, 93 | 0 94 | ], 95 | "nuv": [ 96 | 0, 97 | 0, 98 | 1, 99 | 0, 100 | 0, 101 | 1, 102 | 1, 103 | 1 104 | ], 105 | "minPos": [ 106 | -300, 107 | -62, 108 | 0 109 | ], 110 | "maxPos": [ 111 | 300, 112 | 62, 113 | 0 114 | ] 115 | }, 116 | "isUuid": true, 117 | "imageUuidOrDatabaseUri": "aa761280-1e10-4e3a-bfba-09f6b716f5af@6c48a", 118 | "atlasUuid": "" 119 | }, 120 | "ver": "1.0.11", 121 | "imported": true, 122 | "files": [ 123 | ".json" 124 | ], 125 | "subMetas": {} 126 | } 127 | }, 128 | "userData": { 129 | "fixAlphaTransparencyArtifacts": true, 130 | "hasAlpha": false, 131 | "type": "sprite-frame", 132 | "redirect": "aa761280-1e10-4e3a-bfba-09f6b716f5af@f9941" 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /assets/easyMenu/sprites/sprite_splash.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "ver": "1.0.22", 13 | "importer": "texture", 14 | "uuid": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@6c48a", 15 | "imported": true, 16 | "files": [ 17 | ".json" 18 | ], 19 | "subMetas": {}, 20 | "userData": { 21 | "wrapModeS": "clamp-to-edge", 22 | "wrapModeT": "clamp-to-edge", 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "premultiplyAlpha": false, 27 | "anisotropy": 0, 28 | "isUuid": true, 29 | "imageUuidOrDatabaseUri": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad", 30 | "visible": false 31 | }, 32 | "displayName": "sprite_splash", 33 | "id": "6c48a", 34 | "name": "texture" 35 | }, 36 | "f9941": { 37 | "ver": "1.0.11", 38 | "importer": "sprite-frame", 39 | "uuid": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 40 | "imported": true, 41 | "files": [ 42 | ".json" 43 | ], 44 | "subMetas": {}, 45 | "userData": { 46 | "wrapModeS": "clamp-to-edge", 47 | "wrapModeT": "clamp-to-edge", 48 | "minfilter": "linear", 49 | "magfilter": "linear", 50 | "premultiplyAlpha": false, 51 | "generateMipmap": false, 52 | "anisotropy": 1, 53 | "trimType": "auto", 54 | "trimThreshold": 1, 55 | "rotated": false, 56 | "offsetX": 0, 57 | "offsetY": 0, 58 | "trimX": 0, 59 | "trimY": 0, 60 | "width": 2, 61 | "height": 2, 62 | "rawWidth": 2, 63 | "rawHeight": 2, 64 | "borderTop": 0, 65 | "borderBottom": 0, 66 | "borderLeft": 0, 67 | "borderRight": 0, 68 | "isUuid": true, 69 | "imageUuidOrDatabaseUri": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@6c48a", 70 | "atlasUuid": "", 71 | "mipfilter": "none", 72 | "packable": true, 73 | "vertices": { 74 | "rawPosition": [ 75 | -1, 76 | -1, 77 | 0, 78 | 1, 79 | -1, 80 | 0, 81 | -1, 82 | 1, 83 | 0, 84 | 1, 85 | 1, 86 | 0 87 | ], 88 | "indexes": [ 89 | 0, 90 | 1, 91 | 2, 92 | 2, 93 | 1, 94 | 3 95 | ], 96 | "uv": [ 97 | 0, 98 | 2, 99 | 2, 100 | 2, 101 | 0, 102 | 0, 103 | 2, 104 | 0 105 | ], 106 | "nuv": [ 107 | 0, 108 | 0, 109 | 1, 110 | 0, 111 | 0, 112 | 1, 113 | 1, 114 | 1 115 | ], 116 | "minPos": [ 117 | -1, 118 | -1, 119 | 0 120 | ], 121 | "maxPos": [ 122 | 1, 123 | 1, 124 | 0 125 | ] 126 | }, 127 | "pixelsToUnit": 100, 128 | "pivotX": 0.5, 129 | "pivotY": 0.5, 130 | "meshType": 0 131 | }, 132 | "displayName": "sprite_splash", 133 | "id": "f9941", 134 | "name": "spriteFrame" 135 | } 136 | }, 137 | "userData": { 138 | "type": "sprite-frame", 139 | "redirect": "a08f1843-c7c9-47b4-bfdb-e4f33c639aad@f9941", 140 | "hasAlpha": false, 141 | "fixAlphaTransparencyArtifacts": false 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /assets/easyMenu/sprites/default_toggle_checkmark.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "25cddca5-3f5e-4b39-a9f5-358b4b2ea3a8", 6 | "files": [ 7 | ".json", 8 | ".png" 9 | ], 10 | "subMetas": { 11 | "6c48a": { 12 | "ver": "1.0.22", 13 | "importer": "texture", 14 | "uuid": "25cddca5-3f5e-4b39-a9f5-358b4b2ea3a8@6c48a", 15 | "imported": true, 16 | "files": [ 17 | ".json" 18 | ], 19 | "subMetas": {}, 20 | "userData": { 21 | "wrapModeS": "clamp-to-edge", 22 | "wrapModeT": "clamp-to-edge", 23 | "minfilter": "linear", 24 | "magfilter": "linear", 25 | "mipfilter": "none", 26 | "premultiplyAlpha": false, 27 | "anisotropy": 0, 28 | "isUuid": true, 29 | "imageUuidOrDatabaseUri": "25cddca5-3f5e-4b39-a9f5-358b4b2ea3a8", 30 | "visible": false 31 | }, 32 | "displayName": "default_toggle_checkmark", 33 | "id": "6c48a", 34 | "name": "texture" 35 | }, 36 | "f9941": { 37 | "ver": "1.0.11", 38 | "importer": "sprite-frame", 39 | "uuid": "25cddca5-3f5e-4b39-a9f5-358b4b2ea3a8@f9941", 40 | "imported": true, 41 | "files": [ 42 | ".json" 43 | ], 44 | "subMetas": {}, 45 | "userData": { 46 | "wrapModeS": "clamp-to-edge", 47 | "wrapModeT": "clamp-to-edge", 48 | "minfilter": "linear", 49 | "magfilter": "linear", 50 | "premultiplyAlpha": false, 51 | "generateMipmap": false, 52 | "anisotropy": 1, 53 | "trimType": "auto", 54 | "trimThreshold": 1, 55 | "rotated": false, 56 | "offsetX": 0, 57 | "offsetY": 0, 58 | "trimX": 4, 59 | "trimY": 5, 60 | "width": 20, 61 | "height": 18, 62 | "rawWidth": 28, 63 | "rawHeight": 28, 64 | "borderTop": 0, 65 | "borderBottom": 0, 66 | "borderLeft": 0, 67 | "borderRight": 0, 68 | "isUuid": true, 69 | "imageUuidOrDatabaseUri": "25cddca5-3f5e-4b39-a9f5-358b4b2ea3a8@6c48a", 70 | "atlasUuid": "", 71 | "mipfilter": "none", 72 | "packable": true, 73 | "vertices": { 74 | "rawPosition": [ 75 | -10, 76 | -9, 77 | 0, 78 | 10, 79 | -9, 80 | 0, 81 | -10, 82 | 9, 83 | 0, 84 | 10, 85 | 9, 86 | 0 87 | ], 88 | "indexes": [ 89 | 0, 90 | 1, 91 | 2, 92 | 2, 93 | 1, 94 | 3 95 | ], 96 | "uv": [ 97 | 4, 98 | 23, 99 | 24, 100 | 23, 101 | 4, 102 | 5, 103 | 24, 104 | 5 105 | ], 106 | "nuv": [ 107 | 0.14285714285714285, 108 | 0.17857142857142858, 109 | 0.8571428571428571, 110 | 0.17857142857142858, 111 | 0.14285714285714285, 112 | 0.8214285714285714, 113 | 0.8571428571428571, 114 | 0.8214285714285714 115 | ], 116 | "minPos": [ 117 | -10, 118 | -9, 119 | 0 120 | ], 121 | "maxPos": [ 122 | 10, 123 | 9, 124 | 0 125 | ] 126 | }, 127 | "pixelsToUnit": 100, 128 | "pivotX": 0.5, 129 | "pivotY": 0.5, 130 | "meshType": 0 131 | }, 132 | "displayName": "default_toggle_checkmark", 133 | "id": "f9941", 134 | "name": "spriteFrame" 135 | } 136 | }, 137 | "userData": { 138 | "type": "sprite-frame", 139 | "redirect": "25cddca5-3f5e-4b39-a9f5-358b4b2ea3a8@f9941", 140 | "hasAlpha": true, 141 | "fixAlphaTransparencyArtifacts": false 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /assets/res/low.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "b47c0": { 12 | "importer": "erp-texture-cube", 13 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0", 14 | "displayName": "low", 15 | "id": "b47c0", 16 | "name": "textureCube", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isRGBE": false, 25 | "imageDatabaseUri": "b8e9be68-de7f-4d46-97e5-dbe26cbce375" 26 | }, 27 | "ver": "1.0.10", 28 | "imported": true, 29 | "files": [ 30 | ".json" 31 | ], 32 | "subMetas": { 33 | "74afd": { 34 | "importer": "texture-cube-face", 35 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0@74afd", 36 | "displayName": "", 37 | "id": "74afd", 38 | "name": "right", 39 | "userData": {}, 40 | "ver": "1.0.0", 41 | "imported": true, 42 | "files": [ 43 | ".jpg", 44 | ".json" 45 | ], 46 | "subMetas": {} 47 | }, 48 | "8fd34": { 49 | "importer": "texture-cube-face", 50 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0@8fd34", 51 | "displayName": "", 52 | "id": "8fd34", 53 | "name": "left", 54 | "userData": {}, 55 | "ver": "1.0.0", 56 | "imported": true, 57 | "files": [ 58 | ".jpg", 59 | ".json" 60 | ], 61 | "subMetas": {} 62 | }, 63 | "bb97f": { 64 | "importer": "texture-cube-face", 65 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0@bb97f", 66 | "displayName": "", 67 | "id": "bb97f", 68 | "name": "top", 69 | "userData": {}, 70 | "ver": "1.0.0", 71 | "imported": true, 72 | "files": [ 73 | ".jpg", 74 | ".json" 75 | ], 76 | "subMetas": {} 77 | }, 78 | "7d38f": { 79 | "importer": "texture-cube-face", 80 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0@7d38f", 81 | "displayName": "", 82 | "id": "7d38f", 83 | "name": "bottom", 84 | "userData": {}, 85 | "ver": "1.0.0", 86 | "imported": true, 87 | "files": [ 88 | ".jpg", 89 | ".json" 90 | ], 91 | "subMetas": {} 92 | }, 93 | "e9a6d": { 94 | "importer": "texture-cube-face", 95 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0@e9a6d", 96 | "displayName": "", 97 | "id": "e9a6d", 98 | "name": "front", 99 | "userData": {}, 100 | "ver": "1.0.0", 101 | "imported": true, 102 | "files": [ 103 | ".jpg", 104 | ".json" 105 | ], 106 | "subMetas": {} 107 | }, 108 | "40c10": { 109 | "importer": "texture-cube-face", 110 | "uuid": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0@40c10", 111 | "displayName": "", 112 | "id": "40c10", 113 | "name": "back", 114 | "userData": {}, 115 | "ver": "1.0.0", 116 | "imported": true, 117 | "files": [ 118 | ".jpg", 119 | ".json" 120 | ], 121 | "subMetas": {} 122 | } 123 | } 124 | } 125 | }, 126 | "userData": { 127 | "fixAlphaTransparencyArtifacts": true, 128 | "hasAlpha": false, 129 | "type": "texture cube", 130 | "redirect": "b8e9be68-de7f-4d46-97e5-dbe26cbce375@b47c0" 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /assets/bundles/bundle3/preload/Skybox/factory.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.25", 3 | "importer": "image", 4 | "imported": true, 5 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0", 6 | "files": [ 7 | ".jpg", 8 | ".json" 9 | ], 10 | "subMetas": { 11 | "b47c0": { 12 | "importer": "erp-texture-cube", 13 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0", 14 | "displayName": "factory", 15 | "id": "b47c0", 16 | "name": "textureCube", 17 | "userData": { 18 | "wrapModeS": "repeat", 19 | "wrapModeT": "repeat", 20 | "minfilter": "linear", 21 | "magfilter": "linear", 22 | "mipfilter": "linear", 23 | "anisotropy": 0, 24 | "isRGBE": false, 25 | "imageDatabaseUri": "41d761cf-4717-49eb-9972-043e14111aa0" 26 | }, 27 | "ver": "1.0.10", 28 | "imported": true, 29 | "files": [ 30 | ".json" 31 | ], 32 | "subMetas": { 33 | "74afd": { 34 | "importer": "texture-cube-face", 35 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@74afd", 36 | "displayName": "", 37 | "id": "74afd", 38 | "name": "right", 39 | "userData": {}, 40 | "ver": "1.0.0", 41 | "imported": true, 42 | "files": [ 43 | ".jpg", 44 | ".json" 45 | ], 46 | "subMetas": {} 47 | }, 48 | "8fd34": { 49 | "importer": "texture-cube-face", 50 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@8fd34", 51 | "displayName": "", 52 | "id": "8fd34", 53 | "name": "left", 54 | "userData": {}, 55 | "ver": "1.0.0", 56 | "imported": true, 57 | "files": [ 58 | ".jpg", 59 | ".json" 60 | ], 61 | "subMetas": {} 62 | }, 63 | "bb97f": { 64 | "importer": "texture-cube-face", 65 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@bb97f", 66 | "displayName": "", 67 | "id": "bb97f", 68 | "name": "top", 69 | "userData": {}, 70 | "ver": "1.0.0", 71 | "imported": true, 72 | "files": [ 73 | ".jpg", 74 | ".json" 75 | ], 76 | "subMetas": {} 77 | }, 78 | "7d38f": { 79 | "importer": "texture-cube-face", 80 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@7d38f", 81 | "displayName": "", 82 | "id": "7d38f", 83 | "name": "bottom", 84 | "userData": {}, 85 | "ver": "1.0.0", 86 | "imported": true, 87 | "files": [ 88 | ".jpg", 89 | ".json" 90 | ], 91 | "subMetas": {} 92 | }, 93 | "e9a6d": { 94 | "importer": "texture-cube-face", 95 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@e9a6d", 96 | "displayName": "", 97 | "id": "e9a6d", 98 | "name": "front", 99 | "userData": {}, 100 | "ver": "1.0.0", 101 | "imported": true, 102 | "files": [ 103 | ".jpg", 104 | ".json" 105 | ], 106 | "subMetas": {} 107 | }, 108 | "40c10": { 109 | "importer": "texture-cube-face", 110 | "uuid": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0@40c10", 111 | "displayName": "", 112 | "id": "40c10", 113 | "name": "back", 114 | "userData": {}, 115 | "ver": "1.0.0", 116 | "imported": true, 117 | "files": [ 118 | ".jpg", 119 | ".json" 120 | ], 121 | "subMetas": {} 122 | } 123 | } 124 | } 125 | }, 126 | "userData": { 127 | "fixAlphaTransparencyArtifacts": true, 128 | "hasAlpha": false, 129 | "type": "texture cube", 130 | "redirect": "41d761cf-4717-49eb-9972-043e14111aa0@b47c0" 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eGraph.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, game, Graphics, Label, Node, Sprite, sys, UITransform, Vec3 } from 'cc'; 2 | const { ccclass, property, executeInEditMode } = _decorator; 3 | const tempC_1 = new Color() 4 | const tempVec3 = new Vec3(); 5 | 6 | @ccclass('Easy Graph') 7 | export class eGraph extends Component { 8 | @property(Sprite) 9 | BgSprite: Sprite = null; 10 | @property(Sprite) 11 | SideSprite: Sprite = null; 12 | @property(Label) 13 | NameLable: Label = null; 14 | @property(Graphics) 15 | LineGraph: Graphics = null; 16 | @property(Color) 17 | set MenuItemBgColor(v) { 18 | this.BgColor = v; 19 | this.onNormal(); 20 | } 21 | get MenuItemBgColor() { 22 | return this.BgColor; 23 | } 24 | @property(Color) 25 | set MenuItemSideColor(v) { 26 | this.SideColor = v; 27 | this.onNormal(); 28 | } 29 | get MenuItemSideColor() { 30 | return this.SideColor; 31 | } 32 | @property({ visible: false }) 33 | private BgColor: Color = new Color(40, 40, 40, 255); 34 | @property({ visible: false }) 35 | private SideColor: Color = new Color(0, 130, 180, 255); 36 | 37 | private pressStrenth = 0.75; 38 | public callback: () => string | void | number; 39 | positions:any[]=[]; 40 | _x = 100; 41 | _y = 18; 42 | _points = 10; 43 | _limit = 60; 44 | 45 | 46 | updateData(data:number){ 47 | const length = this.positions.length; 48 | if(length>= this._points){ 49 | this.positions.shift() 50 | } 51 | this.positions.push(data); 52 | this.drawLine(); 53 | } 54 | 55 | init(name: string, cb?: () => string | void | number,limit=60,points= 10) { 56 | this.node.name = name; 57 | this.NameLable.string = name; 58 | cb && (this.callback = cb); 59 | const size = this.LineGraph.getComponent(UITransform); 60 | this._x = size.width; 61 | this._y = size.height*0.85; 62 | this._limit = limit; 63 | this._points = Math.max(Math.floor(points),3); 64 | } 65 | 66 | drawLine(){ 67 | const length = this.positions.length; 68 | if(length<2) return; 69 | this.LineGraph.clear(); 70 | const x = this._x*0.5; 71 | const y = this._y*0.5; 72 | const height = this._y; 73 | const offset = this._x/(this._points-1); 74 | for(var i=0;i { 30 | if (child == this.menu.node) return; 31 | const sprites = child.getComponentsInChildren(Sprite); 32 | sprites.forEach((sprite) => { 33 | if (!this.defaultMaterial) { 34 | this.defaultMaterial = new Material(); 35 | this.defaultMaterial.copy(sprite.material) 36 | } 37 | if (sprite.node.name !== this.node.name) { 38 | sprite.material = material; 39 | } 40 | }) 41 | 42 | }) 43 | } 44 | 45 | addDebug() { 46 | if (!this.menu) return; 47 | const Debug = this.menu.addGroup("Debug") 48 | 49 | if(profiler){ 50 | profiler.showStats(); 51 | Debug 52 | .addToggle("Profiler", (t) => { 53 | t ? profiler.showStats() : profiler.hideStats(); 54 | }) 55 | } 56 | 57 | Debug 58 | .addSlider("Scale", (v: number) => { 59 | TimeScale.scale = v; 60 | }, 1) 61 | .addItem("Game Time", () => { 62 | return "Game Time: " + Math.floor(game.totalTime) + " ms"; 63 | }) 64 | .addToggle("High FPS", (t) => { 65 | game.frameRate = t ? 60 : 30; 66 | }) 67 | .addItem("Overdraw Test", 68 | this.testOverdraw.bind(this) 69 | ) 70 | .addList("Image Memory", 71 | this.getImageMemory.bind(this) 72 | ).addGraph("FPS", null, 60, 14); 73 | 74 | this.graph = Debug.node.getChildByName("FPS").getComponent(eGraph); 75 | 76 | this.graph.callback = (() => { 77 | const output = this.graph.positions.toString(); 78 | console.log("FPS History", output) 79 | this.copyToClipboard(output); 80 | }) 81 | 82 | } 83 | copyToClipboard(output) { 84 | try { 85 | navigator.clipboard.writeText(output); 86 | console.log('Output copied to clipboard'); 87 | } catch (err) { 88 | console.log('Failed to copy: ', err); 89 | } 90 | } 91 | getImageMemory(): string { 92 | const assets = assetManager.assets; 93 | let images: ImageAsset[] = []; 94 | assets.forEach((asset) => { 95 | if (asset instanceof ImageAsset) { 96 | images.push(asset); 97 | } 98 | }) 99 | images.sort(function (a, b) { 100 | return b.height * b.width - a.height * a.width; 101 | }); 102 | let output = ""; 103 | let total = 0; 104 | /* get all imagessets mem */ 105 | images.forEach((image, i) => { 106 | const self = image; 107 | const native = self._native; 108 | const url = self.url; 109 | const num = Math.floor((self.width * self.height * (native.indexOf('jpg') > 0 ? 3 : 4) / 1024 / 1024) * 10000) / 10000; 110 | total += num; 111 | output = output + "\n" + url + "...." + num + "M"; 112 | }) 113 | total = Math.floor(total * 10000) / 10000; 114 | output = "Total Image Mem...." + total + "M" + output; 115 | console.log("Image Mem==", output) 116 | this.copyToClipboard(output); 117 | return output; 118 | } 119 | 120 | add3dEnvDebug() { 121 | if (!this.menu) return; 122 | const scene = director.getScene(); 123 | const globals = scene.globals; 124 | const light = scene.getComponentInChildren(DirectionalLight); 125 | const ambientScale = globals.ambient.skyIllum / 100000; 126 | const lightScale = light.illuminance / 100000; 127 | 128 | this.menu 129 | .addGroup("Env") 130 | .addToggle("Shadow", (t) => { 131 | globals.shadows.enabled = t; 132 | }) 133 | .addToggle("IBL", (t) => { 134 | globals.skybox.useIBL = t; 135 | }) 136 | .addToggle("CSM", (t) => { 137 | light.enableCSM = t; 138 | }) 139 | .addSlider("Ambient", (p) => { 140 | globals.ambient.skyIllum = p * 100000 141 | }, ambientScale) 142 | .addSlider("Light", (p) => { 143 | light.illuminance = p * 100000 144 | }, lightScale) 145 | } 146 | 147 | time = 0; 148 | counter = 0; 149 | update(dt) { 150 | this.counter += 1; 151 | this.time += dt; 152 | if (this.time >= 1) { 153 | const graph = this.graph; 154 | if (!graph) return; 155 | graph.updateData(this.counter) 156 | this.time -= 1; 157 | graph.NameLable.string = "FPS: " + this.counter; 158 | this.counter = 0; 159 | } 160 | } 161 | 162 | 163 | 164 | 165 | } 166 | 167 | -------------------------------------------------------------------------------- /assets/scripts/orbit-camera.ts: -------------------------------------------------------------------------------- 1 | import { Component, _decorator, Vec3, EventTouch, Touch, Quat, Vec2, Node, EventMouse, lerp, macro, input, Input,sys } from 'cc' 2 | import { EDITOR } from 'cc/env'; 3 | 4 | const { ccclass, property, type, executeInEditMode } = _decorator; 5 | 6 | let tempVec3 = new Vec3(); 7 | let tempVec3_2 = new Vec3(); 8 | let tempQuat = new Quat(); 9 | let tempVec2 = new Vec2(); 10 | let tempVec2_2 = new Vec2(); 11 | let DeltaFactor = 1 / 200; 12 | 13 | @ccclass('OrbitCamera') 14 | export default class OrbitCamera extends Component { 15 | 16 | @property enableTouch = true; 17 | @property enableScaleRadius = false; 18 | @property rotateSpeed = 1; 19 | @property followSpeed = 1; 20 | @property xRotationRange = new Vec2(5, 70); 21 | @type(Node) _target: Node; 22 | @property radiusScaleSpeed = 1; 23 | @property minRadius = 5; 24 | @property maxRadius = 10; 25 | @property followTargetRotationY = true; 26 | @property height = 4; 27 | 28 | @property 29 | get radius() { 30 | return this._targetRadius; 31 | } 32 | set radius(v) { 33 | this._targetRadius = v; 34 | } 35 | 36 | @type(Node) 37 | get target() { 38 | return this._target; 39 | } 40 | set target(v) { 41 | this._target = v; 42 | this._targetRotation.set(this._startRotation); 43 | this._targetCenter.set(v!.worldPosition); 44 | } 45 | 46 | @property 47 | get preview() { 48 | return false 49 | } 50 | set preview(v) { 51 | this.resetCam(1); 52 | } 53 | 54 | @property 55 | get targetRotation(): Vec3 { 56 | return this._startRotation; 57 | } 58 | set targetRotation(v: Vec3) { 59 | this._targetRotation.set(v); 60 | this._startRotation.set(v); 61 | } 62 | 63 | 64 | @property({ visible: false }) private _startRotation = new Vec3; 65 | @property({ visible: false }) private _targetRadius = 10; 66 | 67 | private _center = new Vec3; 68 | private _targetCenter = new Vec3; 69 | private _touched = false; 70 | private _targetRotation = new Vec3; 71 | private _rotation = new Quat 72 | private _radius = 10; 73 | private dis = 0; 74 | 75 | start() { 76 | if (!this._target){ 77 | this._target = new Node("target"); 78 | this._target.parent = this.node.parent; 79 | this._target.setPosition(Vec3.ZERO); 80 | } 81 | 82 | if (EDITOR) { 83 | this.resetCam(1); 84 | return; 85 | } 86 | 87 | this.init(); 88 | 89 | } 90 | 91 | init() { 92 | macro.ENABLE_MULTI_TOUCH = true; 93 | 94 | input.on(Input.EventType.TOUCH_START, this.onTouchStart, this) 95 | input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this) 96 | input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this) 97 | input.on(Input.EventType.TOUCH_CANCEL, this.onTouchEnd, this) 98 | 99 | this.resetTargetRotation(); 100 | Quat.fromEuler(this._rotation, this._targetRotation.x, this._targetRotation.y, this._targetRotation.z); 101 | 102 | if (this.target) { 103 | this._targetCenter.set(this.target.worldPosition); 104 | this._center.set(this._targetCenter); 105 | } 106 | 107 | this._radius = this.radius; 108 | 109 | this.limitRotation() 110 | 111 | if (this.enableScaleRadius && sys.platform == sys.Platform.DESKTOP_BROWSER) { 112 | input.on(Input.EventType.MOUSE_WHEEL, this.onMouseWheel, this) 113 | } 114 | 115 | } 116 | 117 | resetTargetRotation() { 118 | let targetRotation = this._targetRotation.set(this._startRotation); 119 | if (this.followTargetRotationY) { 120 | targetRotation = tempVec3_2.set(targetRotation); 121 | Quat.toEuler(tempVec3, this.target!.worldRotation); 122 | targetRotation.y += tempVec3.y; 123 | } 124 | } 125 | 126 | onTouchStart(event?: EventTouch) { 127 | this._touched = true; 128 | } 129 | 130 | 131 | onTouchMove(event?: EventTouch) { 132 | 133 | if (!this._touched) return; 134 | 135 | const touch = event.touch; 136 | 137 | const touches = event.getAllTouches(); 138 | /* scale radius for mobile multi touch */ 139 | if (touches.length > 1) { 140 | const changedTouches = event.getTouches(); 141 | 142 | let touch1: Touch = null!; 143 | let touch2: Touch = null!; 144 | if (changedTouches.length > 1) { 145 | touch1 = touches[0]; 146 | touch2 = touches[1]; 147 | 148 | } else { 149 | touch1 = touch; 150 | const diffID = touch1.getID(); 151 | for (let i = 0; i < touches.length; i++) { 152 | const element = touches[i]; 153 | if (element.getID() !== diffID) { 154 | touch2 = element; 155 | break; 156 | } 157 | } 158 | } 159 | touch1.getLocation(tempVec2); 160 | touch2.getLocation(tempVec2_2); 161 | let dis = Vec2.distance(tempVec2, tempVec2_2) 162 | let delta = dis - this.dis 163 | this._targetRadius += this.radiusScaleSpeed * -Math.sign(delta) * 0.3; 164 | this._targetRadius = Math.min(this.maxRadius, Math.max(this.minRadius, this._targetRadius)); 165 | this.dis = dis; 166 | } 167 | 168 | tempVec2 = touch!.getDelta() 169 | 170 | this.setRotate(tempVec2) 171 | } 172 | 173 | onTouchEnd() { 174 | this._touched = false; 175 | } 176 | 177 | setRotate(v2: Vec2) { 178 | Quat.fromEuler(tempQuat, this._targetRotation.x, this._targetRotation.y, this._targetRotation.z); 179 | 180 | Quat.rotateX(tempQuat, tempQuat, -v2.y * DeltaFactor); 181 | Quat.rotateAround(tempQuat, tempQuat, Vec3.UP, -v2.x * DeltaFactor); 182 | 183 | Quat.toEuler(this._targetRotation, tempQuat); 184 | 185 | this.limitRotation() 186 | } 187 | 188 | 189 | onMouseWheel(event: EventMouse) { 190 | let scrollY = event.getScrollY(); 191 | this._targetRadius += this.radiusScaleSpeed * -Math.sign(scrollY); 192 | this._targetRadius = Math.min(this.maxRadius, Math.max(this.minRadius, this._targetRadius)); 193 | } 194 | 195 | limitRotation() { 196 | let rotation = this._targetRotation; 197 | if (rotation.x < this.xRotationRange.x) { 198 | rotation.x = this.xRotationRange.x 199 | } 200 | else if (rotation.x > this.xRotationRange.y) { 201 | rotation.x = this.xRotationRange.y 202 | } 203 | rotation.z = 0; 204 | } 205 | 206 | 207 | lateUpdate(dt) { 208 | this.resetCam(dt); 209 | } 210 | 211 | resetCam(dt) { 212 | 213 | let targetRotation = this._targetRotation; 214 | this._targetCenter.set(this.target.worldPosition); 215 | this._targetCenter.y += this.height; 216 | 217 | if (this.followTargetRotationY) { 218 | targetRotation = tempVec3_2.set(targetRotation); 219 | Quat.toEuler(tempVec3, this.target.worldRotation); 220 | targetRotation.y += tempVec3.y; 221 | } 222 | 223 | Quat.fromEuler(tempQuat, targetRotation.x, targetRotation.y, targetRotation.z); 224 | 225 | Quat.slerp(this._rotation, this._rotation, tempQuat, dt * 7 * this.rotateSpeed); 226 | 227 | Vec3.lerp(this._center, this._center, this._targetCenter, dt * 5 * this.followSpeed); 228 | 229 | this._radius = lerp(this._radius, this._targetRadius, dt * 10); 230 | 231 | Vec3.transformQuat(tempVec3, Vec3.FORWARD, this._rotation); 232 | 233 | Vec3.multiplyScalar(tempVec3, tempVec3, this._radius) 234 | tempVec3.add(this._center) 235 | 236 | this.node.position = tempVec3; 237 | this.node.lookAt(this._center); 238 | } 239 | 240 | } 241 | -------------------------------------------------------------------------------- /assets/easyMenu/sprites/bmfont.fnt: -------------------------------------------------------------------------------- 1 | info face="bmfont" size=24 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=1,1 2 | common lineHeight=26 base=20 scaleW=169 scaleH=166 pages=1 packed=0 3 | page id=0 file="bmfont.png" 4 | chars count=93 5 | char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=0 xadvance=7 page=0 chnl=15 6 | char id=33 x=18 y=112 width=6 height=20 xoffset=1 yoffset=1 xadvance=7 page=0 chnl=15 7 | char id=34 x=105 y=151 width=10 height=10 xoffset=-1 yoffset=1 xadvance=9 page=0 chnl=15 8 | char id=35 x=153 y=91 width=16 height=20 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 9 | char id=36 x=69 y=0 width=15 height=24 xoffset=-1 yoffset=0 xadvance=14 page=0 chnl=15 10 | char id=37 x=146 y=70 width=23 height=20 xoffset=-1 yoffset=2 xadvance=22 page=0 chnl=15 11 | char id=38 x=80 y=112 width=17 height=20 xoffset=0 yoffset=1 xadvance=17 page=0 chnl=15 12 | char id=39 x=116 y=151 width=5 height=10 xoffset=0 yoffset=1 xadvance=5 page=0 chnl=15 13 | char id=40 x=8 y=0 width=9 height=25 xoffset=0 yoffset=1 xadvance=8 page=0 chnl=15 14 | char id=41 x=18 y=0 width=9 height=25 xoffset=-1 yoffset=1 xadvance=8 page=0 chnl=15 15 | char id=42 x=157 y=112 width=11 height=10 xoffset=-1 yoffset=1 xadvance=10 page=0 chnl=15 16 | char id=43 x=57 y=151 width=15 height=15 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15 17 | char id=44 x=138 y=151 width=6 height=9 xoffset=0 yoffset=16 xadvance=7 page=0 chnl=15 18 | char id=45 x=157 y=123 width=9 height=5 xoffset=-1 yoffset=10 xadvance=8 page=0 chnl=15 19 | char id=46 x=145 y=151 width=5 height=5 xoffset=1 yoffset=16 xadvance=7 page=0 chnl=15 20 | char id=47 x=63 y=112 width=10 height=20 xoffset=-1 yoffset=1 xadvance=7 page=0 chnl=15 21 | char id=48 x=85 y=0 width=15 height=21 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 22 | char id=49 x=98 y=112 width=9 height=19 xoffset=1 yoffset=2 xadvance=14 page=0 chnl=15 23 | char id=50 x=23 y=48 width=15 height=20 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 24 | char id=51 x=101 y=0 width=15 height=21 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 25 | char id=52 x=39 y=48 width=15 height=20 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 26 | char id=53 x=108 y=112 width=15 height=19 xoffset=-1 yoffset=2 xadvance=14 page=0 chnl=15 27 | char id=54 x=55 y=48 width=15 height=20 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 28 | char id=55 x=124 y=112 width=15 height=19 xoffset=-1 yoffset=2 xadvance=14 page=0 chnl=15 29 | char id=56 x=117 y=0 width=15 height=21 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 30 | char id=57 x=133 y=0 width=15 height=21 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 31 | char id=58 x=50 y=151 width=6 height=15 xoffset=1 yoffset=6 xadvance=7 page=0 chnl=15 32 | char id=59 x=150 y=112 width=6 height=19 xoffset=1 yoffset=6 xadvance=7 page=0 chnl=15 33 | char id=60 x=73 y=151 width=17 height=15 xoffset=-1 yoffset=6 xadvance=15 page=0 chnl=15 34 | char id=61 x=122 y=151 width=15 height=9 xoffset=0 yoffset=9 xadvance=15 page=0 chnl=15 35 | char id=62 x=152 y=133 width=17 height=15 xoffset=-1 yoffset=6 xadvance=15 page=0 chnl=15 36 | char id=63 x=48 y=112 width=14 height=20 xoffset=0 yoffset=1 xadvance=14 page=0 chnl=15 37 | char id=64 x=0 y=48 width=22 height=21 xoffset=1 yoffset=1 xadvance=25 page=0 chnl=15 38 | char id=65 x=151 y=48 width=18 height=20 xoffset=-1 yoffset=1 xadvance=17 page=0 chnl=15 39 | char id=66 x=0 y=70 width=17 height=20 xoffset=0 yoffset=1 xadvance=17 page=0 chnl=15 40 | char id=67 x=60 y=26 width=18 height=21 xoffset=0 yoffset=1 xadvance=18 page=0 chnl=15 41 | char id=68 x=18 y=70 width=18 height=20 xoffset=0 yoffset=1 xadvance=18 page=0 chnl=15 42 | char id=69 x=37 y=70 width=15 height=20 xoffset=1 yoffset=1 xadvance=17 page=0 chnl=15 43 | char id=70 x=53 y=70 width=14 height=20 xoffset=1 yoffset=1 xadvance=15 page=0 chnl=15 44 | char id=71 x=79 y=26 width=18 height=21 xoffset=0 yoffset=1 xadvance=19 page=0 chnl=15 45 | char id=72 x=68 y=70 width=17 height=20 xoffset=0 yoffset=1 xadvance=18 page=0 chnl=15 46 | char id=73 x=86 y=70 width=5 height=20 xoffset=1 yoffset=1 xadvance=7 page=0 chnl=15 47 | char id=74 x=98 y=26 width=13 height=21 xoffset=-1 yoffset=1 xadvance=12 page=0 chnl=15 48 | char id=75 x=92 y=70 width=17 height=20 xoffset=0 yoffset=1 xadvance=17 page=0 chnl=15 49 | char id=76 x=110 y=70 width=14 height=20 xoffset=0 yoffset=1 xadvance=14 page=0 chnl=15 50 | char id=77 x=125 y=70 width=20 height=20 xoffset=0 yoffset=1 xadvance=20 page=0 chnl=15 51 | char id=78 x=0 y=91 width=17 height=20 xoffset=0 yoffset=1 xadvance=18 page=0 chnl=15 52 | char id=79 x=149 y=0 width=20 height=21 xoffset=-1 yoffset=1 xadvance=19 page=0 chnl=15 53 | char id=80 x=18 y=91 width=15 height=20 xoffset=1 yoffset=1 xadvance=17 page=0 chnl=15 54 | char id=81 x=112 y=26 width=20 height=21 xoffset=-1 yoffset=1 xadvance=19 page=0 chnl=15 55 | char id=82 x=34 y=91 width=17 height=20 xoffset=1 yoffset=1 xadvance=18 page=0 chnl=15 56 | char id=83 x=133 y=26 width=16 height=21 xoffset=0 yoffset=1 xadvance=17 page=0 chnl=15 57 | char id=84 x=52 y=91 width=17 height=20 xoffset=-1 yoffset=1 xadvance=15 page=0 chnl=15 58 | char id=85 x=150 y=26 width=17 height=21 xoffset=0 yoffset=1 xadvance=18 page=0 chnl=15 59 | char id=86 x=70 y=91 width=18 height=20 xoffset=-1 yoffset=1 xadvance=17 page=0 chnl=15 60 | char id=87 x=89 y=91 width=25 height=20 xoffset=-1 yoffset=1 xadvance=23 page=0 chnl=15 61 | char id=88 x=115 y=91 width=18 height=20 xoffset=-1 yoffset=1 xadvance=17 page=0 chnl=15 62 | char id=89 x=134 y=91 width=18 height=20 xoffset=-1 yoffset=1 xadvance=17 page=0 chnl=15 63 | char id=90 x=0 y=112 width=17 height=20 xoffset=-1 yoffset=1 xadvance=15 page=0 chnl=15 64 | char id=91 x=52 y=0 width=7 height=25 xoffset=0 yoffset=1 xadvance=7 page=0 chnl=15 65 | char id=93 x=60 y=0 width=8 height=25 xoffset=-1 yoffset=1 xadvance=7 page=0 chnl=15 66 | char id=94 x=91 y=151 width=13 height=13 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 67 | char id=95 x=151 y=151 width=16 height=4 xoffset=-1 yoffset=20 xadvance=14 page=0 chnl=15 68 | char id=97 x=47 y=133 width=15 height=16 xoffset=-1 yoffset=5 xadvance=14 page=0 chnl=15 69 | char id=98 x=71 y=48 width=14 height=20 xoffset=0 yoffset=1 xadvance=14 page=0 chnl=15 70 | char id=99 x=63 y=133 width=14 height=16 xoffset=-1 yoffset=5 xadvance=12 page=0 chnl=15 71 | char id=100 x=0 y=26 width=14 height=21 xoffset=-1 yoffset=1 xadvance=14 page=0 chnl=15 72 | char id=101 x=0 y=133 width=15 height=17 xoffset=-1 yoffset=5 xadvance=14 page=0 chnl=15 73 | char id=102 x=86 y=48 width=9 height=20 xoffset=-1 yoffset=1 xadvance=7 page=0 chnl=15 74 | char id=103 x=15 y=26 width=14 height=21 xoffset=-1 yoffset=5 xadvance=14 page=0 chnl=15 75 | char id=104 x=96 y=48 width=13 height=20 xoffset=0 yoffset=1 xadvance=14 page=0 chnl=15 76 | char id=105 x=110 y=48 width=5 height=20 xoffset=0 yoffset=1 xadvance=6 page=0 chnl=15 77 | char id=106 x=0 y=0 width=7 height=25 xoffset=-2 yoffset=1 xadvance=6 page=0 chnl=15 78 | char id=107 x=116 y=48 width=13 height=20 xoffset=0 yoffset=1 xadvance=12 page=0 chnl=15 79 | char id=108 x=130 y=48 width=5 height=20 xoffset=0 yoffset=1 xadvance=6 page=0 chnl=15 80 | char id=109 x=78 y=133 width=20 height=16 xoffset=0 yoffset=5 xadvance=20 page=0 chnl=15 81 | char id=110 x=99 y=133 width=13 height=16 xoffset=0 yoffset=5 xadvance=14 page=0 chnl=15 82 | char id=111 x=16 y=133 width=15 height=17 xoffset=-1 yoffset=5 xadvance=14 page=0 chnl=15 83 | char id=112 x=30 y=26 width=14 height=21 xoffset=0 yoffset=5 xadvance=14 page=0 chnl=15 84 | char id=113 x=45 y=26 width=14 height=21 xoffset=-1 yoffset=5 xadvance=14 page=0 chnl=15 85 | char id=114 x=113 y=133 width=9 height=16 xoffset=0 yoffset=5 xadvance=8 page=0 chnl=15 86 | char id=115 x=32 y=133 width=14 height=17 xoffset=-1 yoffset=5 xadvance=12 page=0 chnl=15 87 | char id=116 x=140 y=112 width=9 height=19 xoffset=-1 yoffset=2 xadvance=7 page=0 chnl=15 88 | char id=117 x=123 y=133 width=13 height=15 xoffset=0 yoffset=6 xadvance=14 page=0 chnl=15 89 | char id=118 x=137 y=133 width=14 height=15 xoffset=-1 yoffset=6 xadvance=12 page=0 chnl=15 90 | char id=119 x=0 y=151 width=19 height=15 xoffset=-1 yoffset=6 xadvance=18 page=0 chnl=15 91 | char id=120 x=20 y=151 width=14 height=15 xoffset=-1 yoffset=6 xadvance=12 page=0 chnl=15 92 | char id=121 x=136 y=48 width=14 height=20 xoffset=-1 yoffset=6 xadvance=12 page=0 chnl=15 93 | char id=122 x=35 y=151 width=14 height=15 xoffset=-1 yoffset=6 xadvance=12 page=0 chnl=15 94 | char id=123 x=28 y=0 width=11 height=25 xoffset=-2 yoffset=1 xadvance=9 page=0 chnl=15 95 | char id=124 x=74 y=112 width=5 height=20 xoffset=0 yoffset=1 xadvance=7 page=0 chnl=15 96 | char id=125 x=40 y=0 width=11 height=25 xoffset=-1 yoffset=1 xadvance=9 page=0 chnl=15 97 | char id=8470 x=25 y=112 width=22 height=20 xoffset=0 yoffset=1 xadvance=22 page=0 chnl=15 98 | -------------------------------------------------------------------------------- /assets/easyMenu/src/eGroup.ts: -------------------------------------------------------------------------------- 1 | import { _decorator, Color, Component, EventTouch, game, instantiate, Label, Node, Prefab, Quat, Size, UITransform } from 'cc'; 2 | import { eItem } from './eItem'; 3 | import { eSlider } from './eSlider'; 4 | import { eToggle } from './eToggle'; 5 | import { eMenu } from './eMenu'; 6 | import { eEdit } from './eEdit'; 7 | import { eList } from './eList'; 8 | import { eGraph } from './eGraph'; 9 | const { ccclass, property, executeInEditMode } = _decorator; 10 | 11 | const _tempQuat = new Quat(); 12 | 13 | @ccclass('EasyGroup') 14 | export class eGroup extends Component { 15 | 16 | @property(Node) arrow: Node; 17 | @property(Node) tittle: Node; 18 | @property(Prefab) menuItem: Prefab; 19 | @property(Prefab) sliderItem: Prefab; 20 | @property(Prefab) toggleItem: Prefab; 21 | @property(Prefab) groupItem: Prefab; 22 | @property(Prefab) editItem: Prefab; 23 | @property(Prefab) listItem: Prefab; 24 | @property(Prefab) graphItem: Prefab; 25 | @property(Label) nameLabel: Label; 26 | 27 | private _size: Size = new Size(200, 30); 28 | private _item: eItem = null; 29 | private _isVisible: boolean = true; 30 | private _groupName = "" 31 | public parentComp: eMenu; 32 | private _time = 0; 33 | 34 | set size(v) { 35 | this._size = v; 36 | this.setMenuNode(); 37 | } 38 | get size() { 39 | return this._size; 40 | } 41 | 42 | set groupName(v) { 43 | this._groupName = v; 44 | this.nameLabel.string = v; 45 | } 46 | 47 | getParent() { 48 | return this.parentComp as eMenu; 49 | } 50 | 51 | onEnable() { 52 | this.tittle.on(Node.EventType.TOUCH_START, this.touchStart, this); 53 | this.tittle.on(Node.EventType.TOUCH_END, this.changeVisible, this); 54 | this.tittle.on(Node.EventType.TOUCH_MOVE, this.dragPos, this); 55 | } 56 | onDisable() { 57 | this.tittle.off(Node.EventType.TOUCH_START, this.touchStart, this); 58 | this.tittle.on(Node.EventType.TOUCH_MOVE, this.dragPos, this); 59 | this.tittle.off(Node.EventType.TOUCH_END, this.changeVisible, this); 60 | } 61 | touchStart() { 62 | this._time = game.totalTime; 63 | } 64 | 65 | dragPos(event: EventTouch) { 66 | const delay = game.totalTime - this._time; 67 | if (delay < 90) return; 68 | const parent = this.node.parent; 69 | const touch = event.touch; 70 | const pos = touch.getUILocation() 71 | parent.setWorldPosition(pos.x, pos.y, 0); 72 | } 73 | /** 74 | * @Description: add new group comp 75 | * @param {string} name 76 | * @return {*} 77 | */ 78 | addGroup(name: string): eGroup { 79 | const item = instantiate(this.groupItem); 80 | const easyGroup = item.getComponent(eGroup); 81 | easyGroup.size = this.size 82 | item.parent = this.node; 83 | if (name) { 84 | easyGroup.groupName = name 85 | } 86 | easyGroup.parentComp = this.getParent(); 87 | return easyGroup; 88 | } 89 | 90 | /** 91 | * @Description: add new slider comp 92 | * @param {string} name default name for slider 93 | * @param {function} cb callback 94 | * @param {number} value 95 | * @param {*} scale 96 | * @return {*} 97 | */ 98 | addSlider(name: string, cb?: (progress: number) => void, value?: number, scale?: number, tempSlider?:eSlider): eGroup { 99 | const item = instantiate(this.sliderItem); 100 | const tranform = item.getComponent(UITransform); 101 | tranform.height = this._size.height; 102 | tranform.width = this._size.width; 103 | item.parent = this.node; 104 | const sliderItem = item.getComponent(eSlider); 105 | sliderItem.slider.progress = value; 106 | sliderItem.editbox.string = "" + value; 107 | sliderItem && sliderItem.init(name, cb, scale); 108 | tempSlider && (tempSlider = sliderItem); 109 | return this; 110 | } 111 | /** 112 | * @Description: add new editbox comp 113 | * @param {string} name name of the comp 114 | * @param {string} editbox default editbox's string 115 | * @param {function} cb edit callback 116 | * @return {*} 117 | */ 118 | addEdit(name: string, editbox: string | number, cb?: (input: string) => void): eGroup { 119 | const item = instantiate(this.editItem); 120 | const tranform = item.getComponent(UITransform); 121 | tranform.height = this._size.height; 122 | tranform.width = this._size.width; 123 | item.parent = this.node; 124 | const editItem = item.getComponent(eEdit); 125 | editItem && editItem.init(name, editbox, cb); 126 | return this; 127 | } 128 | /** 129 | * @Description: add new item comp, could be use for btn or string 130 | * @param {string} name name of graph comp 131 | * @param {function} cb call back for graph click event 132 | * @return {*} 133 | */ 134 | addGraph(name: string, cb?: () => string | void | number,limit=60,points= 10): eGroup{ 135 | const item = instantiate(this.graphItem); 136 | const tranform = item.getComponent(UITransform); 137 | tranform.height = this._size.height; 138 | tranform.width = this._size.width; 139 | item.parent = this.node; 140 | const graphItem = item.getComponent(eGraph); 141 | graphItem && graphItem.init(name, cb,limit,points); 142 | return this; 143 | } 144 | /** 145 | * @Description: add new item comp, could be use for btn or string 146 | * @param {string} name name of item comp 147 | * @param {function} cb call back for item click event 148 | * @return {*} 149 | */ 150 | addItem(name: string, cb?: () => string | void | number): eGroup { 151 | const item = instantiate(this.menuItem); 152 | const tranform = item.getComponent(UITransform); 153 | tranform.height = this._size.height; 154 | tranform.width = this._size.width; 155 | item.parent = this.node; 156 | const menuItem = item.getComponent(eItem); 157 | menuItem && menuItem.init(name, cb); 158 | return this; 159 | } 160 | /** 161 | * @Description: 添加list 162 | * @param {string} name list组件名字 163 | * @param {function} cb 是否需要回调 可以是方法/string/number 164 | * @return {*} 165 | */ 166 | addList(name: string, cb?: () => string | void | number): eGroup { 167 | const item = instantiate(this.listItem); 168 | const tranform = item.getComponent(UITransform); 169 | tranform.width = this._size.width; 170 | item.parent = this.node; 171 | const listItem = item.getComponent(eList); 172 | listItem && listItem.init(name, cb); 173 | return this; 174 | } 175 | /** 176 | * @Description: add toggle comp 177 | * @param {string} name name of toggle comp 178 | * @param {function} cb toggle callback 179 | * @param {*} checked toggle's default checked state 180 | * @return {*} 181 | */ 182 | addToggle(name: string, cb?: (bool: boolean) => void, checked = true): eGroup { 183 | const item = instantiate(this.toggleItem); 184 | const tranform = item.getComponent(UITransform); 185 | tranform.height = this._size.height; 186 | tranform.width = this._size.width; 187 | item.parent = this.node; 188 | const toggleItem = item.getComponent(eToggle); 189 | toggleItem.toggle.isChecked = checked; 190 | toggleItem && toggleItem.init(name, cb); 191 | return this; 192 | } 193 | 194 | setMenuNode() { 195 | this.resetSize(this.node); 196 | const children = this.node.children; 197 | if (children.length > 0) { 198 | children.forEach((c) => { 199 | this.resetSize(c); 200 | }) 201 | } 202 | } 203 | 204 | resetSize(node) { 205 | const tranform = node.getComponent(UITransform); 206 | tranform && tranform.setContentSize(this._size); 207 | } 208 | resetItem(item: eItem) { 209 | if (this._item != item && this._item) this._item.onNormal(); 210 | this._item = item; 211 | } 212 | changeVisible() { 213 | this._isVisible = !this._isVisible; 214 | const children = this.node.children; 215 | this.arrow.rotation = Quat.fromAngleZ(_tempQuat, (this._isVisible ? -90 : 0)); 216 | for (var i = 1; i < children.length; i++) { 217 | children[i].active = this._isVisible; 218 | } 219 | } 220 | } 221 | 222 | -------------------------------------------------------------------------------- /assets/res/effect/Lambert.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. 2 | CCEffect %{ 3 | techniques: 4 | - name: opaque 5 | passes: 6 | - vert: Lambert-vs 7 | frag: Lambert-fs:frag 8 | properties: &props 9 | mainTexture: { value: grey, target: albedoMap, editor: { displayName: AlbedoMap } } 10 | tilingOffset: { value: [1, 1, 0, 0] } 11 | mainColor: { value: [0.95, 0.95, 0.95, 1.0], target: albedoColor, linear: true, editor: { displayName: Albedo, type: color } } 12 | rimLightColor: { value: [1.0, 1.0, 1.0, 0.5], target: rimColor, editor: { parent: USE_RIM_LIGHT,displayName: Rim Light Color, type: color } } 13 | shininess: { value: 0.5,target: bpParams.x, editor: { parent: USE_IBL,slide: true, range: [0., 1.0], step: 0.001 } } 14 | roughness: { value: 0.2,target: bpParams.y, editor: { parent: USE_IBL,slide: true, range: [0.0, 1.0], step: 0.01 } } 15 | albedoScale: { value: [1., 1., 1.], target: albedoScaleAndCutoff.xyz } 16 | alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } } 17 | emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } } 18 | emissiveMap: { value: grey } 19 | normalMap: { value: normal } 20 | normalStrength: { value: 1.0, target: bpParams.w, editor: { parent: USE_NORMAL_MAP, slide: true, range: [0, 5.0], step: 0.001 } } 21 | - &shadow-caster 22 | vert: shadow-caster-vs:vert 23 | frag: shadow-caster-fs:frag 24 | phase: shadow-caster 25 | propertyIndex: 1 26 | rasterizerState: 27 | cullMode: front 28 | properties: 29 | - name: transparent 30 | passes: 31 | - vert: Lambert-vs 32 | frag: Lambert-fs:frag 33 | embeddedMacros: { CC_FORCE_FORWARD_SHADING: true } 34 | depthStencilState: &d1 35 | depthTest: true 36 | depthWrite: false 37 | blendState: &b1 38 | targets: 39 | - blend: true 40 | blendSrc: src_alpha 41 | blendDst: one_minus_src_alpha 42 | blendDstAlpha: one_minus_src_alpha 43 | properties: *props 44 | - *shadow-caster 45 | }% 46 | 47 | CCProgram shared-ubos %{ 48 | uniform Constants { 49 | vec4 tilingOffset; 50 | vec4 albedoColor; 51 | vec4 albedoScaleAndCutoff; 52 | vec4 rimColor; 53 | vec4 emissive; 54 | vec4 bpParams; 55 | }; 56 | }% 57 | 58 | CCProgram Lambert-vs %{ 59 | precision highp float; 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | 68 | #if CC_RECEIVE_SHADOW 69 | out mediump vec2 v_shadowBias; 70 | #endif 71 | 72 | #if USE_NORMAL_MAP 73 | out mediump vec4 v_tangent; 74 | #endif 75 | 76 | #if USE_VERTEX_COLOR 77 | in vec4 a_color; 78 | out vec4 v_color; 79 | #endif 80 | #if USE_RIM_LIGHT 81 | out vec3 v_view_normal; 82 | #endif 83 | 84 | 85 | out vec3 v_position; 86 | out vec3 v_normal; 87 | out vec2 v_uv; 88 | 89 | void main () { 90 | 91 | StandardVertInput In; 92 | CCVertInput(In); 93 | mat4 matWorld, matWorldIT; 94 | CCGetWorldMatrixFull(matWorld, matWorldIT); 95 | vec4 pos = matWorld * In.position; 96 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 97 | CC_TRANSFER_SHADOW(pos); 98 | #endif 99 | v_position = pos.xyz; 100 | #if CC_RECEIVE_SHADOW 101 | v_shadowBias = CCGetShadowBias(); 102 | #endif 103 | CC_TRANSFER_FOG(pos); 104 | 105 | vec4 position = cc_matView * pos; 106 | 107 | vec4 normal = vec4(In.normal,0.0); 108 | 109 | #if USE_RIM_LIGHT 110 | v_view_normal = normalize(((cc_matView * matWorldIT) * normal).xyz); 111 | #endif 112 | 113 | v_normal = normalize((matWorldIT * normal).xyz); 114 | 115 | #if USE_NORMAL_MAP 116 | v_tangent.xyz = normalize((matWorld * vec4(In.tangent.xyz, 0.0)).xyz); 117 | v_tangent.w = In.tangent.w; 118 | #endif 119 | 120 | v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw; 121 | 122 | #if USE_VERTEX_COLOR 123 | v_color = a_color; 124 | #endif 125 | gl_Position = cc_matProj * position; 126 | } 127 | }% 128 | 129 | CCProgram Lambert-fs %{ 130 | precision highp float; 131 | #include 132 | #include 133 | #include 134 | #include 135 | #include 136 | 137 | #if CC_RECEIVE_SHADOW 138 | #include 139 | in mediump vec2 v_shadowBias; 140 | #endif 141 | 142 | in vec3 v_position; 143 | in vec2 v_uv; 144 | in vec3 v_normal; 145 | 146 | #if USE_ALBEDO_MAP 147 | uniform sampler2D albedoMap; 148 | #endif 149 | 150 | #if USE_VERTEX_COLOR 151 | in vec4 v_color; 152 | #endif 153 | 154 | #if USE_ALPHA_TEST 155 | #pragma define-meta ALPHA_TEST_CHANNEL options([a, r, g, b]) 156 | #endif 157 | 158 | #if USE_EMISSIVE_MAP 159 | uniform sampler2D emissiveMap; 160 | #endif 161 | 162 | #if USE_NORMAL_MAP 163 | in mediump vec4 v_tangent; 164 | uniform sampler2D normalMap; 165 | #endif 166 | 167 | #if USE_RIM_LIGHT 168 | in vec3 v_view_normal; 169 | #endif 170 | 171 | #if USE_IBL 172 | #include 173 | #include 174 | #include 175 | #endif 176 | 177 | 178 | void Lambert(inout vec4 diffuseColor,in vec3 normal){ 179 | vec3 N = normalize(normal); 180 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 181 | float NL = max(dot(N, L), 0.0); 182 | vec3 diffuse = NL * (diffuseColor.rgb * cc_mainLitColor.xyz * cc_mainLitColor.w); 183 | vec3 position; 184 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 185 | float shadowCtrl = 1.0; 186 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 187 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 188 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias); 189 | #endif 190 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 191 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias); 192 | #endif 193 | #endif 194 | diffuse *= shadowCtrl; 195 | 196 | //IBL 197 | #if CC_USE_IBL && USE_IBL 198 | vec3 cameraPosition = cc_cameraPos.xyz / cc_cameraPos.w; 199 | vec3 V = normalize(cameraPosition- position); 200 | vec3 env = vec3(1.); 201 | vec3 R = normalize(reflect(-V, N)); 202 | vec3 rotationDir = RotationVecFromAxisY(R.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w); 203 | vec4 envmap = fragTextureLod(cc_environment, rotationDir, bpParams.y * (cc_ambientGround.w - 1.0)); 204 | #if CC_USE_IBL == IBL_RGBE 205 | env = unpackRGBE(envmap); 206 | #else 207 | env = SRGBToLinear(envmap.rgb); 208 | #endif 209 | diffuse = mix(env, diffuse, bpParams.x); 210 | #endif 211 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 212 | diffuseColor.rgb = ambient + diffuse; 213 | } 214 | 215 | vec4 frag () { 216 | //Blinn-Phong from GPT4.0&&iwae 217 | vec4 color = albedoColor; 218 | color.rgb *= albedoScaleAndCutoff.xyz; 219 | #if USE_VERTEX_COLOR 220 | color *= v_color; 221 | #endif 222 | //Albedo 223 | #if USE_ALBEDO_MAP 224 | color *= texture(albedoMap, v_uv); 225 | color.rgb = SRGBToLinear(color.rgb); 226 | #endif 227 | // Alpha Test 228 | #if USE_ALPHA_TEST 229 | if (color.ALPHA_TEST_CHANNEL < albedoScaleAndCutoff.w) discard; 230 | #endif 231 | 232 | vec3 normal = v_normal; 233 | //Normal 234 | #if USE_NORMAL_MAP 235 | vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5); 236 | vec3 bitangent = cross(normal, v_tangent.xyz) * sign(v_tangent.w); // note the cross order 237 | normal = 238 | (nmmp.x * bpParams.w) * normalize(v_tangent.xyz) + 239 | (nmmp.y * bpParams.w) * normalize(bitangent) + 240 | nmmp.z * normalize(normal); 241 | #endif 242 | 243 | //Lambert 244 | Lambert(color,normal); 245 | 246 | //Emmissive 247 | vec3 emissiveCol = emissive.rgb; 248 | 249 | #if USE_EMISSIVE_MAP 250 | emissiveCol *= SRGBToLinear(texture(emissiveMap, v_uv).rgb); 251 | #endif 252 | color.rgb +=emissiveCol; 253 | 254 | //RimLight 255 | #if USE_RIM_LIGHT 256 | vec4 rim; 257 | rim = rimColor; 258 | float fRim = (1.0 - dot(v_view_normal,vec3(0,0,1.0))) * rim.w; 259 | color.rgb = mix(color.rgb,rim.rgb,fRim); 260 | #endif 261 | 262 | //Fog 263 | CC_APPLY_FOG(color); 264 | 265 | //Output 266 | return CCFragOutput(color); 267 | } 268 | }% 269 | 270 | 271 | CCProgram shadow-caster-vs %{ 272 | precision mediump float; 273 | #include 274 | #include 275 | #include 276 | #include 277 | #include 278 | 279 | out vec4 v_worldPos; 280 | out highp vec2 v_clip_depth; 281 | 282 | vec4 vert () { 283 | StandardVertInput In; 284 | CCVertInput(In); 285 | 286 | mat4 matWorld, matWorldIT; 287 | CCGetWorldMatrixFull(matWorld, matWorldIT); 288 | 289 | v_worldPos = matWorld * In.position; 290 | vec4 clipPos = cc_matLightViewProj * v_worldPos; 291 | v_clip_depth = clipPos.zw; 292 | 293 | return clipPos; 294 | } 295 | }% 296 | 297 | CCProgram shadow-caster-fs %{ 298 | precision mediump float; 299 | #include 300 | #include 301 | #include 302 | 303 | in vec4 v_worldPos; 304 | in highp vec2 v_clip_depth; 305 | 306 | vec4 frag () { 307 | highp float clipDepth = v_clip_depth.x / v_clip_depth.y * 0.5 + 0.5; 308 | // spot use linear 309 | #if CC_SHADOWMAP_USE_LINEAR_DEPTH 310 | if (IS_SPOT_LIGHT(cc_shadowLPNNInfo.x)) { 311 | clipDepth = CCGetLinearDepth(v_worldPos.xyz); 312 | } 313 | #endif 314 | #if CC_SHADOWMAP_FORMAT == SHADOWMAP_FORMAT_RGBA8 315 | return packDepthToRGBA(clipDepth); 316 | #else 317 | return vec4(clipDepth, 1.0, 1.0, 1.0); 318 | #endif 319 | } 320 | }% 321 | 322 | 323 | 324 | 325 | 326 | 327 | -------------------------------------------------------------------------------- /assets/res/effect/HalfLambert.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. 2 | CCEffect %{ 3 | techniques: 4 | - name: opaque 5 | passes: 6 | - vert: HalfLambert-vs 7 | frag: HalfLambert-fs:frag 8 | properties: &props 9 | mainTexture: { value: grey, target: albedoMap, editor: { displayName: AlbedoMap } } 10 | tilingOffset: { value: [1, 1, 0, 0] } 11 | mainColor: { value: [0.95, 0.95, 0.95, 1.0], target: albedoColor, linear: true, editor: { displayName: Albedo, type: color } } 12 | rimLightColor: { value: [1.0, 1.0, 1.0, 0.5], target: rimColor, editor: { parent: USE_RIM_LIGHT,displayName: Rim Light Color, type: color } } 13 | diffuseWrap: { value: 0.5,target: bpParams.z, editor: { slide: true, range: [0.5, 1.0], step: 0.001 } } 14 | shininess: { value: 0.5,target: bpParams.x, editor: { parent: USE_IBL, slide: true, range: [0., 1.0], step: 0.001 } } 15 | roughness: { value: 0.2,target: bpParams.y, editor: { parent: USE_IBL, slide: true, range: [0.0, 1.0], step: 0.01 } } 16 | albedoScale: { value: [1., 1., 1.], target: albedoScaleAndCutoff.xyz } 17 | alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } } 18 | emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } } 19 | emissiveMap: { value: grey } 20 | normalMap: { value: normal } 21 | normalStrength: { value: 1.0, target: bpParams.w, editor: { parent: USE_NORMAL_MAP, slide: true, range: [0, 5.0], step: 0.001 } } 22 | - &shadow-caster 23 | vert: shadow-caster-vs:vert 24 | frag: shadow-caster-fs:frag 25 | phase: shadow-caster 26 | propertyIndex: 1 27 | rasterizerState: 28 | cullMode: front 29 | properties: 30 | - name: transparent 31 | passes: 32 | - vert: HalfLambert-vs 33 | frag: HalfLambert-fs:frag 34 | embeddedMacros: { CC_FORCE_FORWARD_SHADING: true } 35 | depthStencilState: &d1 36 | depthTest: true 37 | depthWrite: false 38 | blendState: &b1 39 | targets: 40 | - blend: true 41 | blendSrc: src_alpha 42 | blendDst: one_minus_src_alpha 43 | blendDstAlpha: one_minus_src_alpha 44 | properties: *props 45 | - *shadow-caster 46 | }% 47 | 48 | CCProgram shared-ubos %{ 49 | uniform Constants { 50 | vec4 tilingOffset; 51 | vec4 albedoColor; 52 | vec4 albedoScaleAndCutoff; 53 | vec4 rimColor; 54 | vec4 emissive; 55 | vec4 bpParams; 56 | }; 57 | }% 58 | 59 | CCProgram HalfLambert-vs %{ 60 | precision highp float; 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | 69 | #if CC_RECEIVE_SHADOW 70 | out mediump vec2 v_shadowBias; 71 | #endif 72 | 73 | #if USE_NORMAL_MAP 74 | out mediump vec4 v_tangent; 75 | #endif 76 | 77 | #if USE_VERTEX_COLOR 78 | in vec4 a_color; 79 | out vec4 v_color; 80 | #endif 81 | #if USE_RIM_LIGHT 82 | out vec3 v_view_normal; 83 | #endif 84 | 85 | 86 | out vec3 v_position; 87 | out vec3 v_normal; 88 | out vec2 v_uv; 89 | 90 | void main () { 91 | 92 | StandardVertInput In; 93 | CCVertInput(In); 94 | mat4 matWorld, matWorldIT; 95 | CCGetWorldMatrixFull(matWorld, matWorldIT); 96 | vec4 pos = matWorld * In.position; 97 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 98 | CC_TRANSFER_SHADOW(pos); 99 | #endif 100 | v_position = pos.xyz; 101 | #if CC_RECEIVE_SHADOW 102 | v_shadowBias = CCGetShadowBias(); 103 | #endif 104 | CC_TRANSFER_FOG(pos); 105 | 106 | vec4 position = cc_matView * pos; 107 | 108 | vec4 normal = vec4(In.normal,0.0); 109 | 110 | #if USE_RIM_LIGHT 111 | v_view_normal = normalize(((cc_matView * matWorldIT) * normal).xyz); 112 | #endif 113 | 114 | v_normal = normalize((matWorldIT * normal).xyz); 115 | 116 | #if USE_NORMAL_MAP 117 | v_tangent.xyz = normalize((matWorld * vec4(In.tangent.xyz, 0.0)).xyz); 118 | v_tangent.w = In.tangent.w; 119 | #endif 120 | 121 | v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw; 122 | 123 | #if USE_VERTEX_COLOR 124 | v_color = a_color; 125 | #endif 126 | gl_Position = cc_matProj * position; 127 | } 128 | }% 129 | 130 | CCProgram HalfLambert-fs %{ 131 | precision highp float; 132 | #include 133 | #include 134 | #include 135 | #include 136 | #include 137 | 138 | #if CC_RECEIVE_SHADOW 139 | #include 140 | in mediump vec2 v_shadowBias; 141 | #endif 142 | 143 | in vec3 v_position; 144 | in vec2 v_uv; 145 | in vec3 v_normal; 146 | 147 | #if USE_ALBEDO_MAP 148 | uniform sampler2D albedoMap; 149 | #endif 150 | 151 | #if USE_VERTEX_COLOR 152 | in vec4 v_color; 153 | #endif 154 | 155 | #if USE_ALPHA_TEST 156 | #pragma define-meta ALPHA_TEST_CHANNEL options([a, r, g, b]) 157 | #endif 158 | 159 | #if USE_EMISSIVE_MAP 160 | uniform sampler2D emissiveMap; 161 | #endif 162 | 163 | #if USE_NORMAL_MAP 164 | in mediump vec4 v_tangent; 165 | uniform sampler2D normalMap; 166 | #endif 167 | 168 | #if USE_RIM_LIGHT 169 | in vec3 v_view_normal; 170 | #endif 171 | 172 | #if USE_IBL 173 | #include 174 | #include 175 | #include 176 | #endif 177 | 178 | 179 | void HalfLambert(inout vec4 diffuseColor,in vec3 normal){ 180 | vec3 N = normalize(normal); 181 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 182 | float NL = max(dot(N, L), 0.0); 183 | vec3 diffuse = pow(NL * bpParams.z + (1.-bpParams.z),2.0) * (diffuseColor.rgb * cc_mainLitColor.xyz * cc_mainLitColor.w); 184 | vec3 position; 185 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 186 | float shadowCtrl = 1.0; 187 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 188 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 189 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias); 190 | #endif 191 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 192 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias); 193 | #endif 194 | #endif 195 | diffuse *= shadowCtrl; 196 | 197 | //IBL 198 | #if CC_USE_IBL && USE_IBL 199 | vec3 cameraPosition = cc_cameraPos.xyz / cc_cameraPos.w; 200 | vec3 V = normalize(cameraPosition- position); 201 | vec3 env = vec3(1.); 202 | vec3 R = normalize(reflect(-V, N)); 203 | vec3 rotationDir = RotationVecFromAxisY(R.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w); 204 | vec4 envmap = fragTextureLod(cc_environment, rotationDir, bpParams.y * (cc_ambientGround.w - 1.0)); 205 | #if CC_USE_IBL == IBL_RGBE 206 | env = unpackRGBE(envmap); 207 | #else 208 | env = SRGBToLinear(envmap.rgb); 209 | #endif 210 | diffuse = mix(env, diffuse, bpParams.x); 211 | #endif 212 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 213 | diffuseColor.rgb = ambient + diffuse; 214 | } 215 | 216 | vec4 frag () { 217 | //Blinn-Phong from GPT4.0&&iwae 218 | vec4 color = albedoColor; 219 | color.rgb *= albedoScaleAndCutoff.xyz; 220 | #if USE_VERTEX_COLOR 221 | color *= v_color; 222 | #endif 223 | //Albedo 224 | #if USE_ALBEDO_MAP 225 | color *= texture(albedoMap, v_uv); 226 | color.rgb = SRGBToLinear(color.rgb); 227 | #endif 228 | 229 | vec3 normal = v_normal; 230 | //Normal 231 | #if USE_NORMAL_MAP 232 | vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5); 233 | vec3 bitangent = cross(normal, v_tangent.xyz) * sign(v_tangent.w); // note the cross order 234 | normal = 235 | (nmmp.x * bpParams.w) * normalize(v_tangent.xyz) + 236 | (nmmp.y * bpParams.w) * normalize(bitangent) + 237 | nmmp.z * normalize(normal); 238 | #endif 239 | 240 | //HalfLambert 241 | HalfLambert(color,normal); 242 | 243 | //Emmissive 244 | vec3 emissiveCol = emissive.rgb; 245 | 246 | #if USE_EMISSIVE_MAP 247 | emissiveCol *= SRGBToLinear(texture(emissiveMap, v_uv).rgb); 248 | #endif 249 | color.rgb +=emissiveCol; 250 | 251 | // Alpha Test 252 | #if USE_ALPHA_TEST 253 | if (color.ALPHA_TEST_CHANNEL < albedoScaleAndCutoff.w) discard; 254 | #endif 255 | 256 | //RimLight 257 | #if USE_RIM_LIGHT 258 | vec4 rim; 259 | rim = rimColor; 260 | float fRim = (1.0 - dot(v_view_normal,vec3(0,0,1.0))) * rim.w; 261 | color.rgb = mix(color.rgb,rim.rgb,fRim); 262 | #endif 263 | 264 | //Fog 265 | CC_APPLY_FOG(color); 266 | 267 | //Output 268 | return CCFragOutput(color); 269 | } 270 | }% 271 | 272 | 273 | CCProgram shadow-caster-vs %{ 274 | precision mediump float; 275 | #include 276 | #include 277 | #include 278 | #include 279 | #include 280 | 281 | out vec4 v_worldPos; 282 | out highp vec2 v_clip_depth; 283 | 284 | vec4 vert () { 285 | StandardVertInput In; 286 | CCVertInput(In); 287 | 288 | mat4 matWorld, matWorldIT; 289 | CCGetWorldMatrixFull(matWorld, matWorldIT); 290 | 291 | v_worldPos = matWorld * In.position; 292 | vec4 clipPos = cc_matLightViewProj * v_worldPos; 293 | v_clip_depth = clipPos.zw; 294 | 295 | return clipPos; 296 | } 297 | }% 298 | 299 | CCProgram shadow-caster-fs %{ 300 | precision mediump float; 301 | #include 302 | #include 303 | #include 304 | 305 | in vec4 v_worldPos; 306 | in highp vec2 v_clip_depth; 307 | 308 | vec4 frag () { 309 | highp float clipDepth = v_clip_depth.x / v_clip_depth.y * 0.5 + 0.5; 310 | // spot use linear 311 | #if CC_SHADOWMAP_USE_LINEAR_DEPTH 312 | if (IS_SPOT_LIGHT(cc_shadowLPNNInfo.x)) { 313 | clipDepth = CCGetLinearDepth(v_worldPos.xyz); 314 | } 315 | #endif 316 | #if CC_SHADOWMAP_FORMAT == SHADOWMAP_FORMAT_RGBA8 317 | return packDepthToRGBA(clipDepth); 318 | #else 319 | return vec4(clipDepth, 1.0, 1.0, 1.0); 320 | #endif 321 | } 322 | }% 323 | 324 | 325 | 326 | 327 | 328 | 329 | -------------------------------------------------------------------------------- /assets/res/effect/Blinn-Phong.effect: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. 2 | CCEffect %{ 3 | techniques: 4 | - name: opaque 5 | passes: 6 | - vert: blinnPhong-vs 7 | frag: blinnPhong-fs:frag 8 | properties: &props 9 | mainTexture: { value: grey, target: albedoMap, editor: { displayName: AlbedoMap } } 10 | tilingOffset: { value: [1, 1, 0, 0] } 11 | mainColor: { value: [0.95, 0.95, 0.95, 1.0], target: albedoColor, linear: true, editor: { displayName: Albedo, type: color } } 12 | rimLightColor: { value: [1.0, 1.0, 1.0, 0.5], target: rimColor, editor: { parent: USE_RIM_LIGHT,displayName: Rim Light Color, type: color } } 13 | shininess: { value: 0.5,target: bpParams.x, editor: { slide: true, range: [0., 1.0], step: 0.001 } } 14 | roughness: { value: 0.2,target: bpParams.y, editor: { parent: USE_IBL, slide: true, range: [0.0, 1.0], step: 0.01 } } 15 | albedoScale: { value: [1., 1., 1.], target: albedoScaleAndCutoff.xyz } 16 | alphaThreshold: { value: 0.5, target: albedoScaleAndCutoff.w, editor: { parent: USE_ALPHA_TEST } } 17 | emissive: { value: [0.0, 0.0, 0.0, 1.0], linear: true, editor: { type: color } } 18 | emissiveMap: { value: grey } 19 | normalMap: { value: normal } 20 | normalStrength: { value: 1.0, target: bpParams.w, editor: { parent: USE_NORMAL_MAP, slide: true, range: [0, 5.0], step: 0.001 } } 21 | - &shadow-caster 22 | vert: shadow-caster-vs:vert 23 | frag: shadow-caster-fs:frag 24 | phase: shadow-caster 25 | propertyIndex: 1 26 | rasterizerState: 27 | cullMode: front 28 | properties: 29 | - name: transparent 30 | passes: 31 | - vert: blinnPhong-vs 32 | frag: blinnPhong-fs:frag 33 | embeddedMacros: { CC_FORCE_FORWARD_SHADING: true } 34 | depthStencilState: &d1 35 | depthTest: true 36 | depthWrite: false 37 | blendState: &b1 38 | targets: 39 | - blend: true 40 | blendSrc: src_alpha 41 | blendDst: one_minus_src_alpha 42 | blendDstAlpha: one_minus_src_alpha 43 | properties: *props 44 | - *shadow-caster 45 | }% 46 | 47 | 48 | CCProgram shared-ubos %{ 49 | uniform Constants { 50 | vec4 tilingOffset; 51 | vec4 albedoColor; 52 | vec4 albedoScaleAndCutoff; 53 | vec4 rimColor; 54 | vec4 emissive; 55 | vec4 bpParams; 56 | }; 57 | }% 58 | 59 | CCProgram blinnPhong-vs %{ 60 | precision highp float; 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | 69 | #if CC_RECEIVE_SHADOW 70 | out mediump vec2 v_shadowBias; 71 | #endif 72 | 73 | #if USE_NORMAL_MAP 74 | out mediump vec4 v_tangent; 75 | #endif 76 | 77 | #if USE_VERTEX_COLOR 78 | in vec4 a_color; 79 | out vec4 v_color; 80 | #endif 81 | #if USE_RIM_LIGHT 82 | out vec3 v_view_normal; 83 | #endif 84 | 85 | 86 | out vec3 v_position; 87 | out vec3 v_normal; 88 | out vec2 v_uv; 89 | 90 | void main () { 91 | 92 | StandardVertInput In; 93 | CCVertInput(In); 94 | mat4 matWorld, matWorldIT; 95 | CCGetWorldMatrixFull(matWorld, matWorldIT); 96 | vec4 pos = matWorld * In.position; 97 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 98 | CC_TRANSFER_SHADOW(pos); 99 | #endif 100 | v_position = pos.xyz; 101 | #if CC_RECEIVE_SHADOW 102 | v_shadowBias = CCGetShadowBias(); 103 | #endif 104 | CC_TRANSFER_FOG(pos); 105 | 106 | vec4 position = cc_matView * pos; 107 | 108 | vec4 normal = vec4(In.normal,0.0); 109 | 110 | #if USE_RIM_LIGHT 111 | v_view_normal = normalize(((cc_matView * matWorldIT) * normal).xyz); 112 | #endif 113 | 114 | v_normal = normalize((matWorldIT * normal).xyz); 115 | 116 | #if USE_NORMAL_MAP 117 | v_tangent.xyz = normalize((matWorld * vec4(In.tangent.xyz, 0.0)).xyz); 118 | v_tangent.w = In.tangent.w; 119 | #endif 120 | 121 | v_uv = a_texCoord * tilingOffset.xy + tilingOffset.zw; 122 | 123 | #if USE_VERTEX_COLOR 124 | v_color = a_color; 125 | #endif 126 | gl_Position = cc_matProj * position; 127 | } 128 | }% 129 | 130 | CCProgram blinnPhong-fs %{ 131 | precision highp float; 132 | #include 133 | #include 134 | #include 135 | #include 136 | #include 137 | 138 | #if CC_RECEIVE_SHADOW 139 | #include 140 | in mediump vec2 v_shadowBias; 141 | #endif 142 | 143 | in vec3 v_position; 144 | in vec2 v_uv; 145 | in vec3 v_normal; 146 | 147 | #if USE_ALBEDO_MAP 148 | uniform sampler2D albedoMap; 149 | #endif 150 | 151 | #if USE_VERTEX_COLOR 152 | in vec4 v_color; 153 | #endif 154 | 155 | #if USE_ALPHA_TEST 156 | #pragma define-meta ALPHA_TEST_CHANNEL options([a, r, g, b]) 157 | #endif 158 | 159 | #if USE_EMISSIVE_MAP 160 | uniform sampler2D emissiveMap; 161 | #endif 162 | 163 | #if USE_NORMAL_MAP 164 | in mediump vec4 v_tangent; 165 | uniform sampler2D normalMap; 166 | #endif 167 | 168 | #if USE_RIM_LIGHT 169 | in vec3 v_view_normal; 170 | #endif 171 | 172 | #if USE_IBL 173 | #include 174 | #include 175 | #include 176 | #endif 177 | 178 | 179 | void blinnPhong(inout vec4 diffuseColor,in vec3 normal){ 180 | vec3 N = normalize(normal); 181 | vec3 L = normalize(cc_mainLitDir.xyz * -1.0); 182 | float NL = max(dot(N, L), 0.0); 183 | vec3 diffuse = NL * diffuseColor.rgb * cc_mainLitColor.xyz * cc_mainLitColor.w; 184 | vec3 position; 185 | HIGHP_VALUE_FROM_STRUCT_DEFINED(position, v_position); 186 | vec3 cameraPosition = cc_cameraPos.xyz / cc_cameraPos.w; 187 | vec3 V = normalize(cameraPosition- position); 188 | vec3 H = normalize(L + V); 189 | float specularFactor = pow(max(0.0, dot(H,N)), bpParams.x*50.); 190 | vec3 specular = (specularFactor * cc_ambientSky.rgb * cc_mainLitColor.xyz); 191 | float shadowCtrl = 1.0; 192 | #if CC_RECEIVE_SHADOW && CC_SHADOW_TYPE == CC_SHADOW_MAP 193 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_CASCADED 194 | shadowCtrl = CCCSMFactorBase(position, N, v_shadowBias); 195 | #endif 196 | #if CC_DIR_LIGHT_SHADOW_TYPE == CC_DIR_LIGHT_SHADOW_UNIFORM 197 | shadowCtrl = CCShadowFactorBase(CC_SHADOW_POSITION, N, v_shadowBias); 198 | #endif 199 | #endif 200 | diffuse = (diffuse + specular) * (shadowCtrl); 201 | 202 | //IBL 203 | #if CC_USE_IBL && USE_IBL 204 | vec3 env = vec3(1.); 205 | vec3 R = normalize(reflect(-V, N)); 206 | vec3 rotationDir = RotationVecFromAxisY(R.xyz, cc_surfaceTransform.z, cc_surfaceTransform.w); 207 | vec4 envmap = fragTextureLod(cc_environment, rotationDir, bpParams.y * (cc_ambientGround.w - 1.0)); 208 | #if CC_USE_IBL == IBL_RGBE 209 | env = unpackRGBE(envmap); 210 | #else 211 | env = SRGBToLinear(envmap.rgb); 212 | #endif 213 | diffuse = mix(env, diffuse, specularFactor + bpParams.x); 214 | #endif 215 | vec3 ambient = cc_ambientGround.rgb * diffuseColor.rgb * cc_ambientSky.w; 216 | diffuseColor.rgb = ambient + diffuse; 217 | } 218 | 219 | vec4 frag () { 220 | //Blinn-Phong from GPT4.0&&iwae 221 | vec4 color = albedoColor; 222 | color.rgb *= albedoScaleAndCutoff.xyz; 223 | #if USE_VERTEX_COLOR 224 | color *= v_color; 225 | #endif 226 | //Albedo 227 | #if USE_ALBEDO_MAP 228 | color *= texture(albedoMap, v_uv); 229 | color.rgb = SRGBToLinear(color.rgb); 230 | #endif 231 | 232 | vec3 normal = v_normal; 233 | //Normal 234 | #if USE_NORMAL_MAP 235 | vec3 nmmp = texture(normalMap, v_uv).xyz - vec3(0.5); 236 | vec3 bitangent = cross(normal, v_tangent.xyz) * sign(v_tangent.w); // note the cross order 237 | normal = 238 | (nmmp.x * bpParams.w) * normalize(v_tangent.xyz) + 239 | (nmmp.y * bpParams.w) * normalize(bitangent) + 240 | nmmp.z * normalize(normal); 241 | #endif 242 | 243 | //BlinnPhong 244 | blinnPhong(color,normal); 245 | 246 | //Emmissive 247 | vec3 emissiveCol = emissive.rgb; 248 | #if USE_EMISSIVE_MAP 249 | emissiveCol *= SRGBToLinear(texture(emissiveMap, v_uv).rgb); 250 | #endif 251 | color.rgb +=emissiveCol; 252 | 253 | // Alpha Test 254 | #if USE_ALPHA_TEST 255 | if (color.ALPHA_TEST_CHANNEL < albedoScaleAndCutoff.w) discard; 256 | #endif 257 | 258 | //RimLight 259 | #if USE_RIM_LIGHT 260 | vec4 rim; 261 | rim = rimColor; 262 | float fRim = (1.0 - dot(v_view_normal,vec3(0,0,1.0))) * rim.w; 263 | color.rgb = mix(color.rgb,rim.rgb,fRim); 264 | #endif 265 | 266 | //Fog 267 | CC_APPLY_FOG(color); 268 | 269 | //Output 270 | return CCFragOutput(color); 271 | } 272 | }% 273 | 274 | 275 | CCProgram shadow-caster-vs %{ 276 | precision mediump float; 277 | #include 278 | #include 279 | #include 280 | #include 281 | #include 282 | 283 | out vec4 v_worldPos; 284 | out highp vec2 v_clip_depth; 285 | 286 | vec4 vert () { 287 | StandardVertInput In; 288 | CCVertInput(In); 289 | 290 | mat4 matWorld, matWorldIT; 291 | CCGetWorldMatrixFull(matWorld, matWorldIT); 292 | 293 | v_worldPos = matWorld * In.position; 294 | vec4 clipPos = cc_matLightViewProj * v_worldPos; 295 | v_clip_depth = clipPos.zw; 296 | 297 | return clipPos; 298 | } 299 | }% 300 | 301 | CCProgram shadow-caster-fs %{ 302 | precision mediump float; 303 | #include 304 | #include 305 | #include 306 | 307 | in vec4 v_worldPos; 308 | in highp vec2 v_clip_depth; 309 | 310 | vec4 frag () { 311 | highp float clipDepth = v_clip_depth.x / v_clip_depth.y * 0.5 + 0.5; 312 | // spot use linear 313 | #if CC_SHADOWMAP_USE_LINEAR_DEPTH 314 | if (IS_SPOT_LIGHT(cc_shadowLPNNInfo.x)) { 315 | clipDepth = CCGetLinearDepth(v_worldPos.xyz); 316 | } 317 | #endif 318 | #if CC_SHADOWMAP_FORMAT == SHADOWMAP_FORMAT_RGBA8 319 | return packDepthToRGBA(clipDepth); 320 | #else 321 | return vec4(clipDepth, 1.0, 1.0, 1.0); 322 | #endif 323 | } 324 | }% 325 | 326 | 327 | 328 | 329 | 330 | 331 | --------------------------------------------------------------------------------