1 Star 0 Fork 6

乄风铃彡 / puerts

forked from Tencent / puerts 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

Logo

license unreal unity PRs Welcome CI

What?

in English

puerts is a TypeScript programming solution within game engines.

  • provides a JavaScript Runtime

  • allows TypeScript to access the host engine(module-binding on the JavaScript level and generating TypeScript declarations)

说中文

puerts是游戏引擎下的TypeScript编程解决方案

  • 提供了一个JavaScript运行时

  • 提供通过TypeScript访问宿主引擎的能力(JavaScript层面的绑定以及TypeScript声明生成)

Why?

in English

  • Facililates game building processes by combining JavaScript packages and toolchains with the rendering power of professional game engines

  • In contrast to lua script, TypeScript supports static type checking, which significantly improves code robustness and maintainability.

  • High efficiency: supports reflection binding throughout the platform (engine) - no extra steps (code generation) needed for development.

  • High performance:supports static binding throughout the platform (engine) - takes care of complex scenes

说中文

  • JavaScript生态有众多的库和工具链,结合专业商业引擎的渲染能力,快速打造游戏

  • 相比游戏领域常用的lua脚本,TypeScript的静态类型检查有助于编写更健壮,可维护性更好的程序

  • 高效:全引擎,全平台支持反射Binding,无需额外(生成代码)步骤即可开发

  • 高性能:全引擎,全平台支持静态Binding,兼顾了高性能的场景


How to Install | 最新版本安装

Changelog

Known issues | 已知问题与解决办法


Code Sample | 编程样例

Unity

import {UnityEngine} from 'csharp'

UnityEngine.Debug.Log('hello world');
let gameObject = new UnityEngine.GameObject("testobject");
console.log(gameObject.name);
gameObject.transform.position = new UnityEngine.Vector3(1, 2, 3);

Unreal

import * as UE from 'ue'
import {argv} from 'puerts';
let world = argv.getByName("World") as UE.World;
let actor = world.SpawnActor(UE.MainActor.StaticClass(),
    undefined, UE.ESpawnActorCollisionHandlingMethod.Undefined, undefined, undefined) as UE.MainActor;
console.log(actor.GetName());
console.log(actor.K2_GetActorLocation().ToString());

Manual | 参考文档

Unreal

Unity

Sample Projects | 示例项目

Unreal

Unity

FAQ | 常见问题


Avaliable on these Engine | 引擎

  • unreal engine 4.22 ~ latest

  • unity 5 ~ latest

Available on these Platform | 平台

  • iOS,Android,Windows,Macos

  • 任意.net环境 | Any .net project

Ask for help | 技术支持

Github Discussion

QQ群:942696334

UE4专属群:689643903

开发博客

知乎专栏

Tencent is pleased to support the open source community by making Puerts available. Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. Puerts is licensed under the BSD 3-Clause license, except for the third-party components listed below. Terms of the BSD 3-Clause license: -------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Other dependencies and licenses: Open Source Software Licensed under the MIT license: -------------------------------------------------------------------- 1. doT Copyright (c) 2011 Laura Doktorova Copyright (c) 2010 aefxx,http://aefxx.com/ Terms of the MIT license: -------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

puerts是游戏引擎下的TypeScript编程解决方案 展开 收起
TypeScript
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/fengling375/puerts.git
git@gitee.com:fengling375/puerts.git
fengling375
puerts
puerts
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891