Skip to content

Instantly share code, notes, and snippets.

@liana-p
liana-p / BlasterCharacter.h
Created January 28, 2025 20:34
BlasterCharacter.h with enhanced input actions for UE 5.1+
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "InputMappingContext.h"
#include "BlasterCharacter.generated.h"
@liana-p
liana-p / BlasterCharacter.cpp
Created January 28, 2025 20:33
EnhancedInput version of BlasterCharacter cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "BlasterCharacter.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"
#include "EnhancedInputSubsystems.h"
#include "EnhancedInputComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
@liana-p
liana-p / canvasText.js
Created November 13, 2018 16:09
canvas text wrapped buffer thing using the https://github.com/namniak/canvas-text-wrapper library
function renderToCanvas = function (width, height, renderFunction, canvasParam) {
var buffer = document.createElement('canvas');
buffer.width = width;
buffer.height = height;
if (canvasParam) {
var ctx = buffer.getContext('2d');
for (var i in canvasParam) {
ctx[i] = canvasParam[i];
}
}