Skip to content

Instantly share code, notes, and snippets.

View nakosung's full-sized avatar

Nako Sung nakosung

  • NAVER, CLOVA AI
  • Seoul, Korea
View GitHub Profile
'use strict';
var fs = require('fs');
var lex = require('jade-lexer');
var stripComments = require('jade-strip-comments');
var parse = require('jade-parser');
var load = require('jade-load');
var filters = require('jade-filters');
var link = require('jade-linker');
(function (global) {
"use strict"
Context.RunFile('polyfill/timers.js')
function npm(command) {
let buffer = ''
// Create a node.js process
let proc = JavascriptProcess.Create(
const THE_URL = "https://gist.githubusercontent.com/nakosung/ee76a5f41a59627f22cf/raw"
let actor = null
function write(something) {
if (actor == null) {
actor = new TextRenderActor(GWorld, { X: 800, Z: 100 }, { Yaw: 180 })
actor.TextRender.SetHorizontalAlignment('EHTA_Center')
}
actor.TextRender.K2_SetText(something)
UObject.prototype.ClearTimerbyFunctionName = UObject.prototype.K2_ClearTimer;
UObject.prototype.GetTimerElapsedTimebyFunctionName = UObject.prototype.K2_GetTimerElapsedTime;
UObject.prototype.GetTimerRemainingTimebyFunctionName = UObject.prototype.K2_GetTimerRemainingTime;
UObject.prototype.IsTimerActivebyFunctionName = UObject.prototype.K2_IsTimerActive;
UObject.prototype.IsTimerPausedbyFunctionName = UObject.prototype.K2_IsTimerPaused;
UObject.prototype.PauseTimerbyFunctionName = UObject.prototype.K2_PauseTimer;
UObject.prototype.SetTimerbyFunctionName = UObject.prototype.K2_SetTimer;
UObject.prototype.DoesTimerExistbyFunctionName = UObject.prototype.K2_TimerExists;
UObject.prototype.UnpauseTimerbyFunctionName = UObject.prototype.K2_UnPauseTimer;
UObject.prototype.ToString = UObject.prototype.Conv_ObjectToString;
Context.RunFile('aliases.js')
Context.RunFile('polyfill/unrealengine.js')
Context.RunFile('polyfill/timers.js')
function client() {
class MyTextRenderActor extends TextRenderActor {
ctor() {
this.AppComponent = ApplicationLifecycleComponent.CreateDefaultSubobject("Lifecycle")
this.AppComponent.ApplicationHasEnteredForegroundDelegate.Add(() => {
this.TextRender.SetText("App foreground")
let actor = null
function write(something) {
if (actor == null) {
actor = new TextRenderActor(GWorld, { X: 800, Z: 100 }, { Yaw: 180 })
actor.TextRender.SetHorizontalAlignment('EHTA_Center')
}
actor.TextRender.K2_SetText(something)
}
console.log("Hello Github Gist")
@nakosung
nakosung / rotating-box.js
Last active August 10, 2016 13:10
unreal.js rotating box
GWorld.GetAllActorsOfClass(Light).OutActors.map(l => l.DestroyActor())
function light(color) {
let actor = new PointLight(GWorld)
actor.LightComponent.SetMobility('Movable')
actor.LightComponent.Intensity = 1000
actor.LightComponent.SetLightColor(color)
return actor
}
This file has been truncated, but you can view the full file.
init_all_tables: /job:worker/replica:0/task:0/gpu:0
init_2: /job:worker/replica:0/task:0/gpu:0
group_deps: /job:worker/replica:0/task:0/gpu:0
Const: /job:worker/replica:0/task:0/cpu:0
report_uninitialized_variables/Shape: /job:worker/replica:0/task:0/cpu:0
report_uninitialized_variables/strided_slice: /job:worker/replica:0/task:0/gpu:0
report_uninitialized_variables/concat: /job:worker/replica:0/task:0/gpu:0
report_uninitialized_variables/Reshape: /job:worker/replica:0/task:0/cpu:0
save/Const: /job:worker/replica:0/task:0/cpu:0
save/restore_slice_404: /job:worker/replica:0/task:0/cpu:0
function createAvatar() {
let character = new Character(GWorld)
let controller = new AIController(GWorld)
controller.Possess(character)
let callback = null
controller.OnMoveCompleted = (req, result) => {
if (callback) {
callback(result)
callback = null
}