From d3dc060bbabe4c701ddf74331ca6a4250d9f93fa Mon Sep 17 00:00:00 2001 From: liteng <930372551@qq.com> Date: Mon, 28 Jan 2019 19:39:59 +0800 Subject: [PATCH] =?UTF-8?q?objects=E6=B1=89=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShadowEditor.Web/lang/zh-CN.js | 11 +++- ShadowEditor.Web/src/language/Language.js | 5 ++ ShadowEditor.Web/src/loader/AssimpLoader.js | 2 +- ShadowEditor.Web/src/loader/BVHLoader.js | 2 +- ShadowEditor.Web/src/loader/ColladaLoader.js | 2 +- ShadowEditor.Web/src/loader/FBXLoader.js | 2 +- ShadowEditor.Web/src/loader/GLTFLoader.js | 2 +- ShadowEditor.Web/src/loader/JsLoader.js | 2 +- ShadowEditor.Web/src/loader/LOLLoader.js | 10 ++-- ShadowEditor.Web/src/loader/ModelLoader.js | 4 +- ShadowEditor.Web/src/loader/ObjectLoader.js | 2 +- ShadowEditor.Web/src/loader/SEA3DLoader.js | 2 +- ShadowEditor.Web/src/loader/ThreeDSLoader.js | 0 ShadowEditor.Web/src/lol/Constant.js | 7 --- ShadowEditor.Web/src/object/component/Fire.js | 4 +- .../src/object/component/ParticleEmitter.js | 4 +- .../src/object/component/Smoke.js | 2 +- .../src/object/component/Water.js | 2 +- ShadowEditor.Web/src/object/geometry/Box.js | 2 +- .../src/object/geometry/Circle.js | 2 +- .../src/object/geometry/Cylinder.js | 2 +- ShadowEditor.Web/src/object/geometry/Group.js | 2 +- .../src/object/geometry/Icosahedron.js | 2 +- ShadowEditor.Web/src/object/geometry/Lathe.js | 2 +- ShadowEditor.Web/src/object/geometry/Plane.js | 2 +- .../src/object/geometry/Sphere.js | 2 +- .../src/object/geometry/Sprite.js | 2 +- .../src/object/geometry/Teapot.js | 2 +- ShadowEditor.Web/src/object/geometry/Text.js | 2 +- ShadowEditor.Web/src/object/geometry/Torus.js | 2 +- .../src/object/geometry/TorusKnot.js | 2 +- .../src/object/light/HemisphereLight.js | 2 +- .../src/object/light/PhysicalLight.js | 53 ------------------- .../src/object/light/PointLight.js | 4 +- .../src/object/light/RectAreaLight.js | 4 +- ShadowEditor.Web/src/object/line/Spline.js | 2 +- .../src/object/terrain/PerlinTerrain.js | 2 +- .../src/object/terrain/PhysicsTerrain.js | 2 +- .../src/object/terrain/ShaderTerrain.js | 2 +- 39 files changed, 58 insertions(+), 104 deletions(-) delete mode 100644 ShadowEditor.Web/src/loader/ThreeDSLoader.js delete mode 100644 ShadowEditor.Web/src/lol/Constant.js delete mode 100644 ShadowEditor.Web/src/object/light/PhysicalLight.js diff --git a/ShadowEditor.Web/lang/zh-CN.js b/ShadowEditor.Web/lang/zh-CN.js index 670093a1..3213b5ad 100644 --- a/ShadowEditor.Web/lang/zh-CN.js +++ b/ShadowEditor.Web/lang/zh-CN.js @@ -554,4 +554,13 @@ L_ANISOTROPY = '各向异性'; L_CATEGORY_EDIT = '类别编辑'; L_CATEGORY_LIST = '类别列表'; L_PLEASE_SELECT_CATEGORY = '请选择类别!'; -L_DELETE_SUCCESS = '删除成功!'; \ No newline at end of file +L_DELETE_SUCCESS = '删除成功!'; + +// event + +// loader + +// object +L_HALO = '光晕'; +L_FrontSide = '正面'; +L_BackSide = '背面'; diff --git a/ShadowEditor.Web/src/language/Language.js b/ShadowEditor.Web/src/language/Language.js index 6d1fdbd2..09f96aaa 100644 --- a/ShadowEditor.Web/src/language/Language.js +++ b/ShadowEditor.Web/src/language/Language.js @@ -558,4 +558,9 @@ Object.assign(window, { // event // loader + + // object + L_HALO: 'Halo', + L_FrontSide: 'FrontSide', + L_BackSide: 'BackSide', }); \ No newline at end of file diff --git a/ShadowEditor.Web/src/loader/AssimpLoader.js b/ShadowEditor.Web/src/loader/AssimpLoader.js index 57849175..cc489747 100644 --- a/ShadowEditor.Web/src/loader/AssimpLoader.js +++ b/ShadowEditor.Web/src/loader/AssimpLoader.js @@ -28,7 +28,7 @@ AssimpLoader.prototype.load = function (url, options) { animNames: 'Animation1', scripts: [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/BVHLoader.js b/ShadowEditor.Web/src/loader/BVHLoader.js index a3136408..b6465208 100644 --- a/ShadowEditor.Web/src/loader/BVHLoader.js +++ b/ShadowEditor.Web/src/loader/BVHLoader.js @@ -35,7 +35,7 @@ BVHLoader.prototype.load = function (url, options) { animNames: 'Animation1', scripts: [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/ColladaLoader.js b/ShadowEditor.Web/src/loader/ColladaLoader.js index 31bf7111..6d7d16d2 100644 --- a/ShadowEditor.Web/src/loader/ColladaLoader.js +++ b/ShadowEditor.Web/src/loader/ColladaLoader.js @@ -43,7 +43,7 @@ ColladaLoader.prototype.load = function (url, options) { animNames: collada.animations.map(n => n.name), scripts: [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/FBXLoader.js b/ShadowEditor.Web/src/loader/FBXLoader.js index e757c60a..9e821d8e 100644 --- a/ShadowEditor.Web/src/loader/FBXLoader.js +++ b/ShadowEditor.Web/src/loader/FBXLoader.js @@ -27,7 +27,7 @@ FBXLoader.prototype.load = function (url, options) { animNames: obj3d.animations.map(n => n.name), scripts: [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/GLTFLoader.js b/ShadowEditor.Web/src/loader/GLTFLoader.js index bddb408d..a6735984 100644 --- a/ShadowEditor.Web/src/loader/GLTFLoader.js +++ b/ShadowEditor.Web/src/loader/GLTFLoader.js @@ -35,7 +35,7 @@ GLTFLoader.prototype.load = function (url, options) { animNames: result.animations.map(n => n.name), scripts: [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/JsLoader.js b/ShadowEditor.Web/src/loader/JsLoader.js index 2ac575e9..513684d9 100644 --- a/ShadowEditor.Web/src/loader/JsLoader.js +++ b/ShadowEditor.Web/src/loader/JsLoader.js @@ -29,7 +29,7 @@ JsLoader.prototype.load = function (url, options) { root: mesh, scripts: [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/LOLLoader.js b/ShadowEditor.Web/src/loader/LOLLoader.js index 031185c2..f9ba665d 100644 --- a/ShadowEditor.Web/src/loader/LOLLoader.js +++ b/ShadowEditor.Web/src/loader/LOLLoader.js @@ -14,7 +14,7 @@ LOLLoader.prototype.constructor = LOLLoader; LOLLoader.prototype.load = function (url, options) { if (!Array.isArray(url) || url.length < 3) { - console.warn(`LOLLoader: url必须是数组,而且包含.lmesh、.lanim、.png三个文件地址。`); + console.warn(`LOLLoader: url must be an array, and contains .lmesh,.lanim and .png three urls.`); return new Promise(resolve => { resolve(null); }); @@ -25,21 +25,21 @@ LOLLoader.prototype.load = function (url, options) { var png = url.filter(n => n.endsWith('.png'))[0]; if (lmesh === undefined) { - console.warn(`LOLLoader: url中不包含.lmesh文件地址。`); + console.warn(`LOLLoader: url doesn't contain .lmesh url.`); return new Promise(resolve => { resolve(null); }); } if (lanim === undefined) { - console.warn(`LOLLoader: url中不包含.lanim文件地址。`); + console.warn(`LOLLoader: url doesn't contain .lanim url.`); return new Promise(resolve => { resolve(null); }); } if (png === undefined) { - console.warn(`LOLLoader: url中不包含.png文件地址。`); + console.warn(`LOLLoader: url doesn't contain .png url.`); return new Promise(resolve => { resolve(null); }); @@ -71,7 +71,7 @@ LOLLoader.prototype.load = function (url, options) { mesh.userData.model = model; mesh.userData.scripts = [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name, model), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/ModelLoader.js b/ShadowEditor.Web/src/loader/ModelLoader.js index 74f9bd07..a3bca294 100644 --- a/ShadowEditor.Web/src/loader/ModelLoader.js +++ b/ShadowEditor.Web/src/loader/ModelLoader.js @@ -85,7 +85,7 @@ ModelLoader.prototype.load = function (url, options, environment) { var type = options.Type; if (type === undefined) { - console.warn(`ModelLoader: 未传递type参数,无法加载。`); + console.warn(`ModelLoader: no type parameters, and cannot load.`); return new Promise(resolve => { resolve(null); }); @@ -94,7 +94,7 @@ ModelLoader.prototype.load = function (url, options, environment) { return new Promise(resolve => { var loader = Loaders[type]; if (loader === undefined) { - console.warn(`ModelLoader: 不存在加载${type}后缀模型的加载器。`); + console.warn(`ModelLoader: no ${type} loader.`); resolve(null); return; } diff --git a/ShadowEditor.Web/src/loader/ObjectLoader.js b/ShadowEditor.Web/src/loader/ObjectLoader.js index b3596b2d..819c9116 100644 --- a/ShadowEditor.Web/src/loader/ObjectLoader.js +++ b/ShadowEditor.Web/src/loader/ObjectLoader.js @@ -58,7 +58,7 @@ ObjectLoader.prototype.loadSkinnedMesh = function (scene, options) { mesh.userData.scripts = [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: source, uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/SEA3DLoader.js b/ShadowEditor.Web/src/loader/SEA3DLoader.js index c1e56df6..02464779 100644 --- a/ShadowEditor.Web/src/loader/SEA3DLoader.js +++ b/ShadowEditor.Web/src/loader/SEA3DLoader.js @@ -32,7 +32,7 @@ SEA3DLoader.prototype.load = function (url, options) { animNames: ['Animation1'], scripts: [{ id: null, - name: `${options.Name}动画`, + name: `${options.Name}${L_ANIMATION}`, type: 'javascript', source: this.createScripts(options.Name), uuid: THREE.Math.generateUUID() diff --git a/ShadowEditor.Web/src/loader/ThreeDSLoader.js b/ShadowEditor.Web/src/loader/ThreeDSLoader.js deleted file mode 100644 index e69de29b..00000000 diff --git a/ShadowEditor.Web/src/lol/Constant.js b/ShadowEditor.Web/src/lol/Constant.js deleted file mode 100644 index 950d23b5..00000000 --- a/ShadowEditor.Web/src/lol/Constant.js +++ /dev/null @@ -1,7 +0,0 @@ -var champions_all = [{ "id": 1, "name": "Annie", "title": "黑暗之女", "chinese": "安妮" }, { "id": 2, "name": "Olaf", "title": "狂战士", "chinese": "奥拉夫" }, { "id": 3, "name": "Galio", "title": "哨兵之殇", "chinese": "加里奥" }, { "id": 4, "name": "Twisted Fate", "title": "卡牌大师", "chinese": "崔斯特" }, { "id": 5, "name": "Xin Zhao", "title": "德邦总管", "chinese": "赵信" }, { "id": 6, "name": "Urgot", "title": "首领之傲", "chinese": "厄加特" }, { "id": 7, "name": "LeBlanc", "title": "诡术妖姬", "chinese": "乐芙兰" }, { "id": 8, "name": "Vladimir", "title": "猩红收割者", "chinese": "弗拉基米尔" }, { "id": 9, "name": "Fiddlesticks", "title": "末日使者", "chinese": "费德提克" }, { "id": 10, "name": "Kayle", "title": "审判天使", "chinese": "凯尔" }, { "id": 11, "name": "Master Yi", "title": "无极剑圣", "chinese": "易大师" }, { "id": 12, "name": "Alistar", "title": "牛头酋长", "chinese": "阿利斯塔" }, { "id": 13, "name": "Ryze", "title": "流浪法师", "chinese": "瑞兹" }, { "id": 14, "name": "Sion", "title": "亡灵勇士", "chinese": "赛恩" }, { "id": 15, "name": "Sivir", "title": "战争女神", "chinese": "希维尔" }, { "id": 16, "name": "Soraka", "title": "众星之子", "chinese": "索拉卡" }, { "id": 17, "name": "Teemo", "title": "迅捷斥候", "chinese": "提莫" }, { "id": 18, "name": "Tristana", "title": "麦林炮手", "chinese": "崔丝塔娜" }, { "id": 19, "name": "Warwick", "title": "嗜血猎手", "chinese": "沃里克" }, { "id": 20, "name": "Nunu", "title": "雪人骑士", "chinese": "努努" }, { "id": 21, "name": "Miss Fortune", "title": "赏金猎人", "chinese": "厄运小姐" }, { "id": 22, "name": "Ashe", "title": "寒冰射手", "chinese": "艾希" }, { "id": 23, "name": "Tryndamere", "title": "蛮族之王", "chinese": "泰达米尔" }, { "id": 24, "name": "Jax", "title": "武器大师", "chinese": "贾克斯" }, { "id": 25, "name": "Morgana", "title": "堕落天使", "chinese": "莫甘娜" }, { "id": 26, "name": "Zilean", "title": "时光守护者", "chinese": "基兰" }, { "id": 27, "name": "Singed", "title": "炼金术士", "chinese": "辛吉德" }, { "id": 28, "name": "Evelynn", "title": "寡妇制造者", "chinese": "伊芙琳" }, { "id": 29, "name": "Twitch", "title": "瘟疫之源", "chinese": "图奇" }, { "id": 30, "name": "Karthus", "title": "死亡颂唱者", "chinese": "卡尔萨斯" }, { "id": 31, "name": "Cho'Gath", "title": "虚空恐惧", "chinese": "科加斯" }, { "id": 32, "name": "Amumu", "title": "殇之木乃伊", "chinese": "阿木木" }, { "id": 33, "name": "Rammus", "title": "披甲龙龟", "chinese": "拉莫斯" }, { "id": 34, "name": "Anivia", "title": "冰晶凤凰", "chinese": "艾尼维亚" }, { "id": 35, "name": "Shaco", "title": "恶魔小丑", "chinese": "萨科" }, { "id": 36, "name": "Dr. Mundo", "title": "祖安狂人", "chinese": "蒙多医生" }, { "id": 37, "name": "Sona", "title": "琴瑟仙女", "chinese": "娑娜" }, { "id": 38, "name": "Kassadin", "title": "虚空行者", "chinese": "卡萨丁" }, { "id": 39, "name": "Irelia", "title": "刀锋意志", "chinese": "艾瑞莉娅" }, { "id": 40, "name": "Janna", "title": "风暴之怒", "chinese": "迦娜" }, { "id": 41, "name": "Gangplank", "title": "海洋之灾", "chinese": "普朗克" }, { "id": 42, "name": "Corki", "title": "英勇投弹手", "chinese": "库奇" }, { "id": 43, "name": "Karma", "title": "天启者", "chinese": "卡尔玛" }, { "id": 44, "name": "Taric", "title": "宝石骑士", "chinese": "塔里克" }, { "id": 45, "name": "Veigar", "title": "邪恶小法师", "chinese": "维迦" }, { "id": 48, "name": "Trundle", "title": "巨魔之王", "chinese": "特朗德尔" }, { "id": 50, "name": "Swain", "title": "策士统领", "chinese": "斯维因" }, { "id": 51, "name": "Caitlyn", "title": "皮城女警", "chinese": "凯特琳" }, { "id": 53, "name": "Blitzcrank", "title": "蒸汽机器人", "chinese": "布里茨" }, { "id": 54, "name": "Malphite", "title": "熔岩巨兽", "chinese": "墨菲特" }, { "id": 55, "name": "Katarina", "title": "不祥之刃", "chinese": "卡特琳娜" }, { "id": 56, "name": "Nocturne", "title": "永恒梦魇", "chinese": "魔腾" }, { "id": 57, "name": "Maokai", "title": "扭曲树精", "chinese": "茂凯" }, { "id": 58, "name": "Renekton", "title": "荒漠屠夫", "chinese": "雷克顿" }, { "id": 59, "name": "Jarvan IV", "title": "德玛西亚皇子", "chinese": "嘉文四世" }, { "id": 60, "name": "Elise", "title": "蜘蛛女皇", "chinese": "伊莉丝" }, { "id": 61, "name": "Orianna", "title": "发条魔灵", "chinese": "奥莉安娜" }, { "id": 62, "name": "Wukong", "title": "齐天大圣", "chinese": "孙悟空" }, { "id": 63, "name": "Brand", "title": "复仇焰魂", "chinese": "布兰德" }, { "id": 64, "name": "Lee Sin", "title": "盲僧", "chinese": "李青" }, { "id": 67, "name": "Vayne", "title": "暗夜猎手", "chinese": "薇恩" }, { "id": 68, "name": "Rumble", "title": "机械公敌", "chinese": "兰博" }, { "id": 69, "name": "Cassiopeia", "title": "魔蛇之拥", "chinese": "卡西奥佩娅" }, { "id": 72, "name": "Skarner", "title": "水晶先锋", "chinese": "斯卡纳" }, { "id": 74, "name": "Heimerdinger", "title": "大发明家", "chinese": "黑默丁格" }, { "id": 75, "name": "Nasus", "title": "沙漠死神", "chinese": "内瑟斯" }, { "id": 76, "name": "Nidalee", "title": "狂野女猎手", "chinese": "奈德丽" }, { "id": 77, "name": "Udyr", "title": "兽灵行者", "chinese": "乌迪尔" }, { "id": 78, "name": "Poppy", "title": "钢铁大使", "chinese": "波比" }, { "id": 79, "name": "Gragas", "title": "酒桶", "chinese": "古拉加斯" }, { "id": 80, "name": "Pantheon", "title": "战争之王", "chinese": "潘森" }, { "id": 81, "name": "Ezreal", "title": "探险家", "chinese": "伊泽瑞尔" }, { "id": 82, "name": "Mordekaiser", "title": "金属大师", "chinese": "莫德凯撒" }, { "id": 83, "name": "Yorick", "title": "掘墓者", "chinese": "约里克" }, { "id": 84, "name": "Akali", "title": "暗影之拳", "chinese": "阿卡丽" }, { "id": 85, "name": "Kennen", "title": "狂暴之心", "chinese": "凯南" }, { "id": 86, "name": "Garen", "title": "德玛西亚之力", "chinese": "盖伦" }, { "id": 89, "name": "Leona", "title": "曙光女神", "chinese": "蕾欧娜" }, { "id": 90, "name": "Malzahar", "title": "虚空先知", "chinese": "玛尔扎哈" }, { "id": 91, "name": "Talon", "title": "刀锋之影", "chinese": "泰隆" }, { "id": 92, "name": "Riven", "title": "放逐之刃", "chinese": "锐雯" }, { "id": 96, "name": "Kog'Maw", "title": "深渊巨口", "chinese": "克格莫" }, { "id": 98, "name": "Shen", "title": "暮光之眼", "chinese": "慎" }, { "id": 99, "name": "Lux", "title": "光辉女郎", "chinese": "拉克丝" }, { "id": 101, "name": "Xerath", "title": "远古巫灵", "chinese": "泽拉斯" }, { "id": 102, "name": "Shyvana", "title": "龙血武姬", "chinese": "希瓦娜" }, { "id": 103, "name": "Ahri", "title": "九尾妖狐", "chinese": "阿狸" }, { "id": 104, "name": "Graves", "title": "法外狂徒", "chinese": "格雷福斯" }, { "id": 105, "name": "Fizz", "title": "潮汐海灵", "chinese": "菲兹" }, { "id": 106, "name": "Volibear", "title": "雷霆咆哮", "chinese": "沃利贝尔" }, { "id": 107, "name": "Rengar", "title": "傲之追猎者", "chinese": "雷恩加尔" }, { "id": 110, "name": "Varus", "title": "惩戒之箭", "chinese": "韦鲁斯" }, { "id": 111, "name": "Nautilus", "title": "深海泰坦", "chinese": "诺提勒斯" }, { "id": 112, "name": "Viktor", "title": "机械先驱", "chinese": "维克托" }, { "id": 113, "name": "Sejuani", "title": "凛冬之怒", "chinese": "瑟庄妮" }, { "id": 114, "name": "Fiora", "title": "无双剑姬", "chinese": "菲奥娜" }, { "id": 115, "name": "Ziggs", "title": "爆破鬼才", "chinese": "吉格斯" }, { "id": 117, "name": "Lulu", "title": "仙灵女巫", "chinese": "璐璐" }, { "id": 119, "name": "Draven", "title": "荣耀行刑官", "chinese": "德莱文" }, { "id": 120, "name": "Hecarim", "title": "战争之影", "chinese": "赫卡里姆" }, { "id": 121, "name": "Kha'Zix", "title": "虚空掠夺者", "chinese": "卡吉斯" }, { "id": 122, "name": "Darius", "title": "诺克萨斯之手", "chinese": "德莱厄斯" }, { "id": 126, "name": "Jayce", "title": "未来守护者", "chinese": "杰斯" }, { "id": 127, "name": "Lissandra", "title": "冰霜女巫", "chinese": "丽桑卓" }, { "id": 131, "name": "Diana", "title": "皎月女神", "chinese": "黛安娜" }, { "id": 133, "name": "Quinn", "title": "德玛西亚之翼", "chinese": "奎因" }, { "id": 134, "name": "Syndra", "title": "暗黑元首", "chinese": "辛德拉" }, { "id": 136, "name": "Aurelion Sol", "title": "铸星龙王", "chinese": "奥瑞利安·索尔" }, { "id": 143, "name": "Zyra", "title": "荆棘之兴", "chinese": "婕拉" }, { "id": 150, "name": "Gnar", "title": "迷失之牙", "chinese": "纳尔" }, { "id": 154, "name": "Zac", "title": "生化魔人", "chinese": "扎克" }, { "id": 157, "name": "Yasuo", "title": "疾风剑豪", "chinese": "亚索" }, { "id": 161, "name": "Vel'Koz", "title": "虚空之眼", "chinese": "维克兹" }, { "id": 163, "name": "Taliyah", "title": "岩雀", "chinese": "塔莉垭" }, { "id": 164, "name": "Camille", "title": "钢铁之影", "chinese": "卡蜜儿" }, { "id": 201, "name": "Braum", "title": "弗雷尔卓德之心", "chinese": "布隆" }, { "id": 202, "name": "Jhin", "title": "戏命师", "chinese": "烬" }, { "id": 203, "name": "Kindred", "title": "永猎双子", "chinese": "千珏" }, { "id": 222, "name": "Jinx", "title": "暴走萝莉", "chinese": "金克丝" }, { "id": 223, "name": "Tahm Kench", "title": "河流之王", "chinese": "塔姆·肯奇" }, { "id": 236, "name": "Lucian", "title": "圣枪游侠", "chinese": "卢锡安" }, { "id": 238, "name": "Zed", "title": "影流之主", "chinese": "劫" }, { "id": 240, "name": "Kled", "title": "暴怒骑士", "chinese": "克烈" }, { "id": 245, "name": "Ekko", "title": "时间刺客", "chinese": "艾克" }, { "id": 254, "name": "Vi", "title": "皮城执法官", "chinese": "蔚" }, { "id": 266, "name": "Aatrox", "title": "暗裔剑魔", "chinese": "亚托克斯" }, { "id": 267, "name": "Nami", "title": "唤潮鲛姬", "chinese": "娜美" }, { "id": 268, "name": "Azir", "title": "沙漠皇帝", "chinese": "阿兹尔" }, { "id": 412, "name": "Thresh", "title": "魂锁典狱长", "chinese": "锤石" }, { "id": 420, "name": "Illaoi", "title": "海兽祭司", "chinese": "俄洛伊" }, { "id": 421, "name": "Rek'Sai", "title": "虚空遁地兽", "chinese": "雷克塞" }, { "id": 427, "name": "Ivern", "title": "翠神", "chinese": "艾翁" }, { "id": 429, "name": "Kalista", "title": "复仇之矛", "chinese": "卡莉丝塔" }, { "id": 432, "name": "Bard", "title": "星界游神", "chinese": "巴德" }, { "id": 497, "name": "Rakan", "title": "幻翎", "chinese": "洛" }, { "id": 498, "name": "Xayah", "title": "逆羽", "chinese": "霞" }, { "id": "sightward", "name": "sightward", "title": "守卫", "chinese": "默认守卫" }, { "id": "sru_dragon_air", "name": "Air Dragon", "title": "风龙", "chinese": "空气龙" }, { "id": "sru_baron", "name": "Baron", "title": "纳什男爵", "chinese": "纳什男爵" }, { "id": "sru_dragon", "name": "Dragon", "title": "龙", "chinese": "龙" }, { "id": "sru_dragon_earth", "name": "Earth Dragon", "title": "土龙", "chinese": "土龙" }, { "id": "sru_dragon_elder", "name": "Elder Dragon", "title": "大龙", "chinese": "大龙" }, { "id": "sru_dragon_fire", "name": "Fire Dragon", "title": "火龙", "chinese": "火龙" }, { "id": "sru_murkwolf", "name": "Murk Wolf", "title": "黑暗狼", "chinese": "黑暗狼" }, { "id": "sru_gromp", "name": "Gromp", "title": "蛤蟆", "chinese": "蛤蟆" }, { "id": "bw_ironback", "name": "Ironback", "title": "铁背", "chinese": "铁背" }, { "id": "kingporo", "name": "King Poro", "title": "魄罗王", "chinese": "魄罗王" }, { "id": "kingporo_porofollower", "name": "King Poro Follower", "title": "魄罗王随从", "chinese": "魄罗王随从" }, { "id": "bw_ocklepod", "name": "Ocklepod", "title": "Ocklepod", "chinese": "Ocklepod" }, { "id": "bw_plundercrab", "name": "Plundercrab", "title": "掠夺蟹", "chinese": "掠夺蟹" }, { "id": "sru_red", "name": "Red Brambleback", "title": "红树", "chinese": "红树" }, { "id": "sru_crab", "name": "Rift Scuttler", "title": "迅捷蟹", "chinese": "迅捷蟹" }, { "id": "tt_spiderboss", "name": "Vilemaw", "title": "蜘蛛王", "chinese": "蜘蛛王" }, { "id": "sru_dragon_water", "name": "Water Dragon", "title": "水龙", "chinese": "水龙" }]; - -var champions = [{ "id": 1, "name": "Annie", "title": "黑暗之女", "chinese": "安妮" }, { "id": 11, "name": "Master Yi", "title": "无极剑圣", "chinese": "易大师" }, { "id": 22, "name": "Ashe", "title": "寒冰射手", "chinese": "艾希" }, { "id": 40, "name": "Janna", "title": "风暴之怒", "chinese": "迦娜" }, { "id": 86, "name": "Garen", "title": "德玛西亚之力", "chinese": "盖伦" }, { "id": 99, "name": "Lux", "title": "光辉女郎", "chinese": "拉克丝" }, { "id": 103, "name": "Ahri", "title": "九尾妖狐", "chinese": "阿狸" }, { "id": 117, "name": "Lulu", "title": "仙灵女巫", "chinese": "璐璐" }, { "id": 222, "name": "Jinx", "title": "暴走萝莉", "chinese": "金克丝" }, { "id": 498, "name": "Xayah", "title": "逆羽", "chinese": "霞" }, { "id": "bw_plundercrab", "name": "Plundercrab", "title": "掠夺蟹", "chinese": "掠夺蟹" }, { "id": "sru_crab", "name": "Rift Scuttler", "title": "迅捷蟹", "chinese": "迅捷蟹" }]; - -var animNames = [{ "id": 0, "name": "attack1", "chinese": "攻击1" }, { "id": 1, "name": "attack2", "chinese": "攻击2" }, { "id": 2, "name": "channel", "chinese": "施法" }, { "id": 3, "name": "channel_wndup", "chinese": "施法打断" }, { "id": 4, "name": "crit", "chinese": "重击" }, { "id": 5, "name": "dance", "chinese": "跳舞" }, { "id": 6, "name": "death", "chinese": "死亡" }, { "id": 7, "name": "idle1", "chinese": "站立1" }, { "id": 8, "name": "joke", "chinese": "玩笑" }, { "id": 9, "name": "laugh", "chinese": "大笑" }, { "id": 10, "name": "recall", "chinese": "回城" }, { "id": 11, "name": "run", "chinese": "跑步" }, { "id": 12, "name": "spell1", "chinese": "技能1" }, { "id": 13, "name": "spell2", "chinese": "技能2" }, { "id": 14, "name": "spell3", "chinese": "技能3" }, { "id": 15, "name": "spell4", "chinese": "技能4" }, { "id": 16, "name": "taunt", "chinese": "嘲讽" }, { "id": 17, "name": "attack3", "chinese": "攻击3" }, { "id": 18, "name": "idle2", "chinese": "站立2" }, { "id": 19, "name": "idle3", "chinese": "站立3" }, { "id": 20, "name": "idle4", "chinese": "站立4" }]; - -export { champions_all, champions, animNames }; \ No newline at end of file diff --git a/ShadowEditor.Web/src/object/component/Fire.js b/ShadowEditor.Web/src/object/component/Fire.js index 4792ddbe..ebca8878 100644 --- a/ShadowEditor.Web/src/object/component/Fire.js +++ b/ShadowEditor.Web/src/object/component/Fire.js @@ -21,9 +21,9 @@ function Fire(camera, options = {}) { this.add(fire.mesh); - fire.mesh.name = '火焰'; + fire.mesh.name = L_FIRE; - this.name = '火焰'; + this.name = L_FIRE; this.position.y = 2; Object.assign(this.userData, { diff --git a/ShadowEditor.Web/src/object/component/ParticleEmitter.js b/ShadowEditor.Web/src/object/component/ParticleEmitter.js index 3cdb3c95..96efc70e 100644 --- a/ShadowEditor.Web/src/object/component/ParticleEmitter.js +++ b/ShadowEditor.Web/src/object/component/ParticleEmitter.js @@ -43,11 +43,11 @@ function ParticleEmitter(group, emitter) { group.addEmitter(emitter); - group.mesh.name = '粒子'; + group.mesh.name = L_PARTICLE; this.add(group.mesh); - this.name = '粒子发射器'; + this.name = L_PARTICLE_EMITTER; Object.assign(this.userData, { type: 'ParticleEmitter', diff --git a/ShadowEditor.Web/src/object/component/Smoke.js b/ShadowEditor.Web/src/object/component/Smoke.js index 3385aed2..9a10fc90 100644 --- a/ShadowEditor.Web/src/object/component/Smoke.js +++ b/ShadowEditor.Web/src/object/component/Smoke.js @@ -58,7 +58,7 @@ function Smoke(camera, renderer, options = {}) { this.sortParticles = true; - this.name = '烟'; + this.name = L_SMOKE; Object.assign(this.userData, { type: 'Smoke', diff --git a/ShadowEditor.Web/src/object/component/Water.js b/ShadowEditor.Web/src/object/component/Water.js index ed06b51e..7959122b 100644 --- a/ShadowEditor.Web/src/object/component/Water.js +++ b/ShadowEditor.Web/src/object/component/Water.js @@ -44,7 +44,7 @@ function Water(renderer) { // 创建网格 THREE.Mesh.call(this, geometry, material); - this.name = '水'; + this.name = L_WATER; this.rotation.x = -Math.PI / 2; diff --git a/ShadowEditor.Web/src/object/geometry/Box.js b/ShadowEditor.Web/src/object/geometry/Box.js index 040c2adf..5cc44ced 100644 --- a/ShadowEditor.Web/src/object/geometry/Box.js +++ b/ShadowEditor.Web/src/object/geometry/Box.js @@ -6,7 +6,7 @@ function Box(geometry = new THREE.BoxBufferGeometry(1, 1, 1), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '正方体'; + this.name = L_BOX; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Circle.js b/ShadowEditor.Web/src/object/geometry/Circle.js index 0b7586cb..297765bf 100644 --- a/ShadowEditor.Web/src/object/geometry/Circle.js +++ b/ShadowEditor.Web/src/object/geometry/Circle.js @@ -6,7 +6,7 @@ function Circle(geometry = new THREE.CircleBufferGeometry(1, 32), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '圆'; + this.name = L_CIRCLE; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Cylinder.js b/ShadowEditor.Web/src/object/geometry/Cylinder.js index 53f0eddb..b9eb006f 100644 --- a/ShadowEditor.Web/src/object/geometry/Cylinder.js +++ b/ShadowEditor.Web/src/object/geometry/Cylinder.js @@ -6,7 +6,7 @@ function Cylinder(geometry = new THREE.CylinderBufferGeometry(1, 1, 2, 32, 1, false), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '圆柱体'; + this.name = L_CYLINDER; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Group.js b/ShadowEditor.Web/src/object/geometry/Group.js index 0ac03f6e..3634eea8 100644 --- a/ShadowEditor.Web/src/object/geometry/Group.js +++ b/ShadowEditor.Web/src/object/geometry/Group.js @@ -3,7 +3,7 @@ */ function Group() { THREE.Object3D.call(this); - this.name = '组'; + this.name = L_GROUP; } Group.prototype = Object.create(THREE.Object3D.prototype); diff --git a/ShadowEditor.Web/src/object/geometry/Icosahedron.js b/ShadowEditor.Web/src/object/geometry/Icosahedron.js index 022abe7f..a1e1ca83 100644 --- a/ShadowEditor.Web/src/object/geometry/Icosahedron.js +++ b/ShadowEditor.Web/src/object/geometry/Icosahedron.js @@ -6,7 +6,7 @@ function Icosahedron(geometry = new THREE.IcosahedronBufferGeometry(1, 2), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '二十面体'; + this.name = L_ICOSAHEDRON; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Lathe.js b/ShadowEditor.Web/src/object/geometry/Lathe.js index 1d5ba86b..7863131f 100644 --- a/ShadowEditor.Web/src/object/geometry/Lathe.js +++ b/ShadowEditor.Web/src/object/geometry/Lathe.js @@ -20,7 +20,7 @@ var points = [ function Lathe(geometry = new THREE.LatheBufferGeometry(points, 20, 0, 2 * Math.PI), material = new THREE.MeshStandardMaterial({ side: THREE.DoubleSide })) { THREE.Mesh.call(this, geometry, material); - this.name = '酒杯'; + this.name = L_LATHE; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Plane.js b/ShadowEditor.Web/src/object/geometry/Plane.js index 9758d582..c6cd73bb 100644 --- a/ShadowEditor.Web/src/object/geometry/Plane.js +++ b/ShadowEditor.Web/src/object/geometry/Plane.js @@ -6,7 +6,7 @@ function Plane(geometry = new THREE.PlaneBufferGeometry(50, 50), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '平面'; + this.name = L_PLANE; this.rotation.x = -Math.PI / 2; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Sphere.js b/ShadowEditor.Web/src/object/geometry/Sphere.js index ca870c8f..78424e98 100644 --- a/ShadowEditor.Web/src/object/geometry/Sphere.js +++ b/ShadowEditor.Web/src/object/geometry/Sphere.js @@ -6,7 +6,7 @@ function Sphere(geometry = new THREE.SphereBufferGeometry(1, 32, 16, 0, Math.PI * 2, 0, Math.PI), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '球体'; + this.name = L_SPHERE; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Sprite.js b/ShadowEditor.Web/src/object/geometry/Sprite.js index 43aec864..fd2192a0 100644 --- a/ShadowEditor.Web/src/object/geometry/Sprite.js +++ b/ShadowEditor.Web/src/object/geometry/Sprite.js @@ -5,7 +5,7 @@ function Sprite(material = new THREE.SpriteMaterial()) { THREE.Sprite.call(this, material); - this.name = '精灵'; + this.name = L_SPRITE; } Sprite.prototype = Object.create(THREE.Sprite.prototype); diff --git a/ShadowEditor.Web/src/object/geometry/Teapot.js b/ShadowEditor.Web/src/object/geometry/Teapot.js index 66b3b00e..c6bbae6d 100644 --- a/ShadowEditor.Web/src/object/geometry/Teapot.js +++ b/ShadowEditor.Web/src/object/geometry/Teapot.js @@ -20,7 +20,7 @@ function Teapot(geometry = new THREE.TeapotBufferGeometry(3, 10, true, true, tru blinn: true }; - this.name = '茶壶'; + this.name = L_TEAPOT; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/Text.js b/ShadowEditor.Web/src/object/geometry/Text.js index 28973a8e..9b2f68b6 100644 --- a/ShadowEditor.Web/src/object/geometry/Text.js +++ b/ShadowEditor.Web/src/object/geometry/Text.js @@ -4,7 +4,7 @@ import StringUtils from '../../utils/StringUtils'; * 文本 * @param {*} text 文字 */ -function Text(text = '文字') { +function Text(text = L_TEXT) { var canvas = document.createElement('canvas'); var fontSize = 64; diff --git a/ShadowEditor.Web/src/object/geometry/Torus.js b/ShadowEditor.Web/src/object/geometry/Torus.js index cdfae145..8963aef9 100644 --- a/ShadowEditor.Web/src/object/geometry/Torus.js +++ b/ShadowEditor.Web/src/object/geometry/Torus.js @@ -6,7 +6,7 @@ function Torus(geometry = new THREE.TorusBufferGeometry(2, 1, 32, 32, Math.PI * 2), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '轮胎'; + this.name = L_TORUS; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/geometry/TorusKnot.js b/ShadowEditor.Web/src/object/geometry/TorusKnot.js index 10dec08b..cf0efed7 100644 --- a/ShadowEditor.Web/src/object/geometry/TorusKnot.js +++ b/ShadowEditor.Web/src/object/geometry/TorusKnot.js @@ -6,7 +6,7 @@ function TorusKnot(geometry = new THREE.TorusKnotBufferGeometry(2, 0.8, 64, 12, 2, 3), material = new THREE.MeshStandardMaterial()) { THREE.Mesh.call(this, geometry, material); - this.name = '纽结'; + this.name = L_TORUS_KNOT; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/light/HemisphereLight.js b/ShadowEditor.Web/src/object/light/HemisphereLight.js index 5ac0eccd..451e7a00 100644 --- a/ShadowEditor.Web/src/object/light/HemisphereLight.js +++ b/ShadowEditor.Web/src/object/light/HemisphereLight.js @@ -26,7 +26,7 @@ function HemisphereLight(skyColor, groundColor, intensity) { }); var sky = new THREE.Mesh(skyGeo, skyMat); - sky.name = '天空'; + sky.name = L_SKY; sky.userData.type = 'sky'; this.add(sky); diff --git a/ShadowEditor.Web/src/object/light/PhysicalLight.js b/ShadowEditor.Web/src/object/light/PhysicalLight.js deleted file mode 100644 index 67cccc42..00000000 --- a/ShadowEditor.Web/src/object/light/PhysicalLight.js +++ /dev/null @@ -1,53 +0,0 @@ -// ref for lumens: http://www.power-sure.com/lumens.htm -var bulbLuminousPowers = { - "110000 lm (1000W)": 110000, - "3500 lm (300W)": 3500, - "1700 lm (100W)": 1700, - "800 lm (60W)": 800, - "400 lm (40W)": 400, - "180 lm (25W)": 180, - "20 lm (4W)": 20, - "Off": 0 -}; - -// ref for solar irradiances: https://en.wikipedia.org/wiki/Lux -var hemiLuminousIrradiances = { - "0.0001 lx (无月之夜)": 0.0001, - "0.002 lx (夜晚辉光)": 0.002, - "0.5 lx (满月)": 0.5, - "3.4 lx (城市暮光)": 3.4, - "50 lx (客厅)": 50, - "100 lx (很阴沉)": 100, - "350 lx (办公室)": 350, - "400 lx (日出日落)": 400, - "1000 lx (阴沉)": 1000, - "18000 lx (阳光)": 18000, - "50000 lx (太阳直射)": 50000 -}; - -var params = { - shadows: true, - exposure: 0.68, - bulbPower: Object.keys(bulbLuminousPowers)[4], - hemiIrradiance: Object.keys(hemiLuminousIrradiances)[0] -}; - -/** - * 物理光源 - */ -function PhysicalLight(color, intensity, distance, decay) { - THREE.PointLight.call(this, color, intensity, distance, decay); - - var bulbGeometry = new THREE.SphereBufferGeometry(0.02, 16, 8); - var bulbMat = new THREE.MeshStandardMaterial({ - emissive: 0xffffee, - emissiveIntensity: 1, - color: new THREE.Color(color) - }); - this.add(new THREE.Mesh(bulbGeometry, bulbMat)); -} - -PhysicalLight.prototype = Object.create(THREE.PhysicalLight.prototype); -PhysicalLight.prototype.constructor = PhysicalLight; - -export default PhysicalLight; \ No newline at end of file diff --git a/ShadowEditor.Web/src/object/light/PointLight.js b/ShadowEditor.Web/src/object/light/PointLight.js index 3631e173..8ff1b054 100644 --- a/ShadowEditor.Web/src/object/light/PointLight.js +++ b/ShadowEditor.Web/src/object/light/PointLight.js @@ -11,7 +11,7 @@ function PointLight(color, intensity, distance, decay) { var mesh = new THREE.Mesh(geometry, material); // 帮助器 - mesh.name = '帮助器'; + mesh.name = L_HELP; mesh.userData.type = 'helper'; this.add(mesh); @@ -29,7 +29,7 @@ function PointLight(color, intensity, distance, decay) { lensflare.addElement(new THREE.LensflareElement(textureFlare3, 60, 0.6)); lensflare.addElement(new THREE.LensflareElement(textureFlare3, 45, 0.8)); - lensflare.name = '光晕'; + lensflare.name = L_HALO; lensflare.userData.type = 'lensflare'; this.add(lensflare); diff --git a/ShadowEditor.Web/src/object/light/RectAreaLight.js b/ShadowEditor.Web/src/object/light/RectAreaLight.js index 411a1f0a..2520dc71 100644 --- a/ShadowEditor.Web/src/object/light/RectAreaLight.js +++ b/ShadowEditor.Web/src/object/light/RectAreaLight.js @@ -9,7 +9,7 @@ function RectAreaLight(color, intensity, width, height) { rectLightMesh.scale.x = width; rectLightMesh.scale.y = height; - rectLightMesh.name = '正面'; + rectLightMesh.name = L_FrontSide; rectLightMesh.userData.type = 'frontSide'; this.add(rectLightMesh); @@ -19,7 +19,7 @@ function RectAreaLight(color, intensity, width, height) { rectLightMeshBack.scale.y = height; rectLightMeshBack.rotation.y = Math.PI; - rectLightMesh.name = '背面'; + rectLightMesh.name = L_BackSide; rectLightMesh.userData.type = 'backSide'; this.add(rectLightMeshBack); diff --git a/ShadowEditor.Web/src/object/line/Spline.js b/ShadowEditor.Web/src/object/line/Spline.js index 05a7d281..48f66578 100644 --- a/ShadowEditor.Web/src/object/line/Spline.js +++ b/ShadowEditor.Web/src/object/line/Spline.js @@ -14,7 +14,7 @@ function Spline() { THREE.Line.call(this, geometry, material); - this.name = '曲线'; + this.name = L_SPLINE; this.castShadow = true; diff --git a/ShadowEditor.Web/src/object/terrain/PerlinTerrain.js b/ShadowEditor.Web/src/object/terrain/PerlinTerrain.js index 42294fe8..d1eb807e 100644 --- a/ShadowEditor.Web/src/object/terrain/PerlinTerrain.js +++ b/ShadowEditor.Web/src/object/terrain/PerlinTerrain.js @@ -29,7 +29,7 @@ function PerlinTerrain(width = 1000, depth = 1000, widthSegments = 256, depthSeg // 创建网格 THREE.Mesh.call(this, geometry, new THREE.MeshLambertMaterial({ map: texture })); - this.name = '地形'; + this.name = L_TERRAIN; this.position.y = -50; diff --git a/ShadowEditor.Web/src/object/terrain/PhysicsTerrain.js b/ShadowEditor.Web/src/object/terrain/PhysicsTerrain.js index dbaa50b9..d6bc5e36 100644 --- a/ShadowEditor.Web/src/object/terrain/PhysicsTerrain.js +++ b/ShadowEditor.Web/src/object/terrain/PhysicsTerrain.js @@ -33,7 +33,7 @@ function PhysicsTerrain() { // 创建网格 THREE.Mesh.call(this, geometry, material); - this.name = '地形'; + this.name = L_TERRAIN; this.castShadow = true; this.receiveShadow = true; diff --git a/ShadowEditor.Web/src/object/terrain/ShaderTerrain.js b/ShadowEditor.Web/src/object/terrain/ShaderTerrain.js index 52ab566c..af610fb8 100644 --- a/ShadowEditor.Web/src/object/terrain/ShaderTerrain.js +++ b/ShadowEditor.Web/src/object/terrain/ShaderTerrain.js @@ -121,7 +121,7 @@ function ShaderTerrain(renderer, options) { THREE.Mesh.call(this, geometry, terrainMaterial); - this.name = '地形'; + this.name = L_TERRAIN; this.position.set(0, -30, 0); this.rotation.x = -Math.PI / 2; this.scale.set(0.1, 0.1, 0.1);